在窗体的FormClosing事件中处理:
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
e.Cancel = True
End Sub
Form.FormClosing 事件:http://msdn.microsoft.com/zh-cn/library/vstudio/system.windows.forms.form.formclosing(v=vs.110).aspx
好像是在事件中加:
e.cancel=true