 |
|
VB.NET Windows Form ทำให้กดปุ่มกากบาท Close อ่ะครับให้มี messagebox มาถามถ้า yes ให้ปิด no ให้ยังไม่ปิดอ่ะครับใช้อีเวนอะไรครับ |
|
 |
|
|
 |
 |
|
ได้แล้วนะคราฟฟฟ
Code (VB.NET)
Private Sub Data_History_Bus_Form_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show("คุณต้องการปิดหน้าต่างนี้", "ออกจากหน้าต่าง", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = Windows.Forms.DialogResult.OK Then
e.Cancel = False
Else
e.Cancel = True
End If
End Sub
แฮะๆ ใจร้อนถามไปหน่อย
|
 |
 |
 |
 |
Date :
2012-10-05 23:07:32 |
By :
ultraman_ex |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|