我有,當我按下關閉按鈕basicaly說:「你確定要退出」,但是當我點擊任何按鈕或取消,但程序關閉任何如何彈出一個消息框確認程序關閉與一個消息
這是我的代碼:
'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
Forgivness?你什麼意思 ? – Raptor
你從來沒有測試的結果 –
可能重複[VB.NET:MessageBox的與YesNoCancel - 否取消觸發相同的事件](http://stackoverflow.com/questions/2256909/vb-net-messagebox-with-yesnocancel-no -cancel-觸發器-相同事件) – billinkc