السلام عليكم


هذا الموضوع استكمال لدورة الاكواد الشاملة


'15- اغلاق الفورم بطريقة فلاشية

كود PHP:
Public Class Form1

   
Private Sub Form1_FormClosing(ByVal sender As ObjectByVal e As System.Windows.Forms.FormClosingEventArgsHandles Me.FormClosing

       Dim d 
As Double
       
For 1 To 0 0.1 Step -0.1
           System
.Threading.Thread.Sleep(50)
           
Application.DoEvents()
           
Me.Opacity d
           Me
.Refresh()
       
Next d
       Environment
.Exit(0)

   
End Sub

   
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load

       Timer1
.Enabled True

   End Sub

   
Private Sub Timer1_Tick(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Timer1.Tick

       
If Me.Opacity 1 Then
           Timer1
.Enabled False
           Timer1
.Dispose()
           Exit 
Sub
       
Else
           
Me.Opacity += 0.1
           Me
.Refresh()
       
End If

   
End Sub
End 
Class

'15- اغلاق الفورم بطريقة فلاشية 
'16-الغاء وظيفة مفتاح الاغلاق


كود PHP:
Public Class Form1

   
Private Sub Form1_FormClosing(ByVal sender As ObjectByVal e As System.Windows.Forms.FormClosingEventArgsHandles Me.FormClosing

       e
.Cancel True


   End Sub
End 
Class

'16-الغاء وظيفة مفتاح الاغلاق 

'17-جعل الفورم دائما بالمقدمة

كود PHP:
Public Class Form1

   
Private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load

       Me
.TopMost True

   End Sub
End 
Class

'17-جعل الفورم دائما بالمقدمة