Answer:
The answer to this question is given below in the explanation section.
Step-by-step explanation:
The answer to part a is given below:
The code is written in C# that will display a confirmation box and the user will decide to click either Yes or No.
When the user will click on the Save button.
*************************************************************************************************
private void saveButton_Click(object sender, EventArgs e) /*when user click on save button a confirmation dialog box will get open*/
{
DialogResult dr; /*DialogResult will save the result of confirmation i.e yes or no*/
dr=MessageBox.Show("Do you want to continue","Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information); /*open the message box with message "Do you want to continue" and with confirmation option "yes" or "no"*/
if(dr==DialogResult.Yes) /*if user press Yes button*/
{
Close(); /*then it will close the dialog box*/
}
}
*************************************************************************************************
The code for part b: To display a prompt box with the message "Enter your Grade" and give the default grade as 6. is given below: you can write this code in VB.net.
int gradeValue = 6; // declare default value
if (Tmp.InputBox("Enter your grade", gradeValue, ref value) == DialogResult.OK) // show prompt box to user with default value
{
//your code what will happen when user enter his/her grade
}