06-09-18, 09:01 PM
تحياتي للجميع
لكي تعم الفائدة الطريقة كانت كالتالي :
لكي تعم الفائدة الطريقة كانت كالتالي :
PHP كود :
Public reason As String = ""
' عدم السماح باغلاق الفورم من التاسك بار
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If reason <> "Inform" Then
e.Cancel = True
End If
End Sub
' السماح باغلاق الفورم من الزر الخاص بك للاغلاق
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
reason = "Inform"
Application.Exit()
or
me.close()
End Sub

