After completing Ex 10-2 I decided to play with it. I added an interim form with 4 group boxes each with 3 radio buttons to give me a choice for the entries of the AcceptAgreementForm's text, icon (I pulled the image from my.resources), Accept button and Decline button. I set the default radio button for each group box and set the form's "accept button" to the OK button on the form (distinctive name and only button on the form). I displayed the form to check it but the OK button doesn't do anything!! Do the group boxes affect the form seeing the OK button? I used the same display code that I've used to display the other forms. I guess I'm getting ahead of the book again.
Code:
'
' create the choice and dialog boxes
'
Dim chooseDialogEntriesDialog As New ChooseDialogEntriesForm
Dim customMessageDialog As New CustomMessageForm
'
' Initialize the choices and display the 'Choose' dialog
'
chooseDialogEntriesDialog.rdbLabelAcceptAgreement.Checked = True
chooseDialogEntriesDialog.rdbLabelWell.Checked = False
chooseDialogEntriesDialog.rdbLabelTakeYourPick.Checked = False
chooseDialogEntriesDialog.rdbIconQuestion.Checked = False
chooseDialogEntriesDialog.rdbIconQuestion2.Checked = False
chooseDialogEntriesDialog.rdbIconQuestion3.Checked = True
chooseDialogEntriesDialog.rdbOkAccept.Checked = True
chooseDialogEntriesDialog.rdbOkOk.Checked = False
chooseDialogEntriesDialog.rebOkIGuessSo.Checked = False
chooseDialogEntriesDialog.rdbCancelCancel.Checked = False
chooseDialogEntriesDialog.rdbCancelDecline.Checked = True
chooseDialogEntriesDialog.rdbCancelNo.Checked = False
If (chooseDialogEntriesDialog.ShowDialog() = Windows.Forms.DialogResult.OK) Then
MessageBox.Show("Thanks for making your choices")
End If