CodeItBetter Programming Another VB Programming Blog

How to Roll down a form using a timer control

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'Forms - How to Roll down a form using a timer control
Option Explicit
 
Dim K As Integer
 
Private Sub Form_Load()
    Form1.Height = 5
    Timer1.Interval = 100
    Timer1.Enabled = True
End Sub
 
Private Sub Timer1_Timer()
    K = K + 200
    Form1.Height = K
    If Form1.Height > 6675 Then
        Form1.Height = 6675
        Timer1.Enabled = False
    End If
    'If you set the startup position of your form to "Center Screen" then 
    'uncomment the following statement
    'Me.Move Me.Left, (Screen.Height / 2 - Me.Height / 2)
End Sub
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.