Hi Luna
I think I have made a mistake - I think you should test for the
DialogResult.No - I think you too have mede the same error in your sample -
but it can't be the only problem.
Try to see the yellow tooltip for each of the parameters in the
MessageBox.Show.
What about your 'line breakes' - is there a space before the underscore ?
- it should be a peace of cake.
KS, Denmark
"Luna" <an*******@discussions.microsoft.com> skrev i en meddelelse
news:B1**********************************@microsof t.com...
Hi,
i have tried your code but i cannot seem to get it to work!!
this is what i tried, but im gettin an error that says:
An unhandled exception of type
'System.ComponentModel.InvalidEnumArgumentExceptio n' occurred in
system.windows.forms.dll
Additional information: Enum argument value 32 is not valid for buttons.
buttons should be a value from DialogResult.
If MessageBox.Show("If you continue, you will lose the current
booking. Do you wish to continue?", _ MessageBoxButtons.YesNo, MessageBoxIcon.Question, _
MessageBoxDefaultButton.Button1) = DialogResult.No
Then Me.Close()
End If
what do i change to make work?
Luna