关于窗口的关闭如果编写了窗口的Closing事件,例如:Private Sub Login_FormClosing(ByVal sender As Object
关于窗口的关闭 如果编写了窗口的Closing事件,例如:
Private Sub Login_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If MessageBox.Show("是否退出?", "确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = System.Windows.Forms.DialogResult.Cancel Then e.Cancel = True Else e.Cancel = False End End If End Sub