基本的に「終了してもよろしいですか」という閉じるボタンを押すとポップアップするメッセージボックスがありますが、いいえボタンをクリックするかキャンセルすると、プログラムはどのように閉じます
これは私のコードです:
'Close Button
Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
Dim result = MessageBox.Show(" Are you sure you want to quit", "Are you sure?", MessageBoxButtons.YesNoCancel)
Me.Close()
End Sub