10-01-20, 02:46 AM
(10-01-20, 02:14 AM)علي بنيان كتب : هذا الكود ينهي الفورم بطريقة تلاشي والتعليمة End او me.close تقوم بأنهاء البرنامج من الذاكرةشكرا لك اخي علي
PHP كود :
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim close_form As String
close_form = MsgBox("هل تريد إغلاق النافذة",
MessageBoxButtons.YesNo + MessageBoxIcon.Question, "خروج")
If close_form = DialogResult.Yes Then
Dim iCount As Integer
For iCount = 90 To 10 Step -3
Me.Opacity = iCount / 100
Me.Refresh()
Threading.Thread.Sleep(50)
Next
End
Else
e.Cancel = True
End If
End Sub

