08-04-14, 07:48 PM
08-04-14, 08:54 PM
نحمده ونصلي على رسوله الكريم
في حدث الـ FormClosing هناك خاصية Cancel تابعة للـ EventArgs المعرفة في الوسيطة e تستطيع جعلها true لالغاء الخروج من التطبيق
في حدث الـ FormClosing هناك خاصية Cancel تابعة للـ EventArgs المعرفة في الوسيطة e تستطيع جعلها true لالغاء الخروج من التطبيق
كود :
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show("هل انت متاكد من انهاء البرنامج؟", Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.RightAlign Or MessageBoxOptions.RtlReading) = DialogResult.Cancel Then
e.Cancel = True
End If
End Sub08-04-14, 11:21 PM
جزاك الله خيراً