|
Intro
This tutorial will be really short.
Go to form1_closing and type in
the following code:
Dim result As MsgBoxResult
result = MessageBox.Show("Do you really want to quit?", "Quit?",
MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.No Then
e.Cancel = True
End If
Most of it is pretty self explanatory.
Run it and you'll see that it won't let you quit unless you push
Yes. The only way to quit (without going through the messagebox) is
to control alt delete out of the program.
That's pretty much it for this tutorial (I told you it would be
short).
There is no
source code for this tutorial (everything is right above!) |