hi. soo i got this codes off of some site.
its for a cool form entry and exit effect.
but since im using this in my project i need to know what this lines of codes mean.
and i mean every line.
the site where i got it from doesnt offer this info which i need.
im hoping that you guys could help me out with this.
i need to explain every line of code in class.
you will need :
2 timers for this.
first timers set to true. the others false. each with 15 interval.
heres the code.
Option Explicit
Dim X As Integer, Y As Integer
Private Sub Form_Load()
X = Me.Width
Y = Me.Height
Me.Width = 0
Me.Height = 0
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Timer1_Timer()
'Timer for the opening event
If Me.Width < X Then
Me.Left = (Screen.Width - Me.Width) / 2
Me.Width = Me.Width + 400
Exit Sub
ElseIf Me.Width > X Then
Me.Width = X
End If
If Me.Height < Y Then
Me.Top = (Screen.Height - Me.Height) / 2
Me.Height = Me.Height + 350
Exit Sub
ElseIf Me.Height > Y Then
Me.Height = Y
End If
Timer1.Enabled = False
End Sub
Private Sub Timer2_Timer()
Do While Me.Width > 1800
Me.Width = Me.Width - 300
Me.Left = Me.Left + 150
If Me.Height - 400 Then
Me.Top = Me.Top - 1
Me.Height = Me.Height - 150
End If
Me.Refresh
DoEvents
Loop
Unload Form1: End
End Sub