You are on page 1of 1

Message box

Dim result As DialogResult = MessageBox.Show("Are you sure you want to exit the program?", "Exit",
MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)

If result = DialogResult.Yes Then


Application.Exit ()
End If

You might also like