34,333
edits
Changes
→Programming Menu Items in Visual Basic
<pre>
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles ExitToolStripMenuItem.Click
Close()
End Sub
</pre>
<pre>
Private Sub SaveOnExitMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles SaveOnExitMenu.Click
SaveOnExitMenu.Checked = Not (SaveOnExitMenu.Checked)
End Sub
</pre>
Press '''F5''' to build and run the application once again. When ''Save on Exit'' is clicked, the checked status will
change to eitehr set or unset depending on the current setting.