السلام عليكم
هذا الموضوع استكمال لدورة الاكواد الشاملة
'49-كود لتحريك الفورم من اعلى الى اسفل والعكس
كود PHP:
Imports System.Threading.Thread
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Me.Top < 439 Then
Me.Top = Me.Top + 5
Sleep(5)
Else : Timer2.Enabled = True
Timer1.Enabled = False
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If Me.Top > 0 Then
Me.Top = Me.Top - 5
Sleep(5)
Else : Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
End Class
'49-كود لتحريك الفورم من اعلى الى اسفل والعكس
'50-عمل ظل للفورم
كود PHP:
Public Class Form1
Inherits Form
Private Shared CS_DROPSHADOW As Int32 = &H20000
Protected Overloads Overrides ReadOnly Property _
CreateParams() As CreateParams
Get
Dim parameters As CreateParams = _
MyBase.CreateParams
parameters.ClassStyle = _
parameters.ClassStyle Or CS_DROPSHADOW
Return parameters
End Get
End Property
End Class
'50-عمل ظل للفورم