Suppose a program has a button with the caption Quit Suppose
     Suppose a program has a button with the caption \"Quit.\" Suppose also that the Name property of this button is btnQuit. Write a btnQuit_Click event procedure that gives the user a second chance before ending the program. The procedure should use an input box to request that the user confirm that the program should K terminated, and then end the program only if the user responds in the affirmative  Write a program to handle a savings-account withdrawal. The program should request the current balance and the amount of the withdrawal as input and then display the new balance. If the withdrawal is greater than the original balance, the program should display \"Withdrawal denied.\" If the new balance is less than $150, the message \"Balance below $150, should be displayed.  Write a program that requests three scores as input and displays the average of the two highest scores. The input and output should be handled by Sub procedures, and the average should be determined by a user-defined function.  Write a program that allows the user to use a button to toggle the color of the text in a text box between black and red.
 
  
  Solution
32)
btnQuit_Click event Code:
Dim val As MsgBoxResult = MessageBox.Show(\"Are you sure?\",\"Quit\", _
MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If result = MsgBoxResult.Yes Then
Application.Exit();
End If
33)
place two labels and two textboxes one for entering balance and another for withdrawl amount
change thier name using textbox properites as txtBal and txtwithdrawal
code for button click event:
Dim diff As long
diff = txtBal.Text - txtwithdrawal.Text
If diff < 0 Then
Label1.Text = \"Withdrawal Denied\"
ElseIf diff < 150 Then
Label1.Text = \"Balance is\" &diff
End If
End Sub
40)
code for botton click event:
if TextBox1.ForeColor = Color.Black Then
TextBox1.ForeColor = Color.Red
Else
TextBox1.ForeColor = Color.Black;
End If


