VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A Cool Form Scroller

by thuggish_187 (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

A really cool code that will first - make the form expand down, then second - it will expand out sideways! No need to customize it to the size you want, it does that automatically. Just pop it in your code. Really easy - good beginner's code!

Assumes
Put a timer(Timer1) on the form... that's it.

Rate A Cool Form Scroller

Dim frmHeight As Integer
Dim frmWidth As Integer
Private Sub Form_Load()
Timer1.Interval = 1
frmHeight = Form1.Height
frmWidth = Form1.Width
Form1.Height = 100
Form1.Width = 100
End Sub
Private Sub Timer1_Timer()
While Form1.Height < frmHeight
Form1.Height = Form1.Height + 8
Wend
While Form1.Width < frmWidth
Form1.Width = Form1.Width + 8
Wend
Timer1.Enabled = False
End Sub

Download this snippet    Add to My Saved Code

A Cool Form Scroller Comments

No comments have been posted about A Cool Form Scroller. Why not be the first to post a comment about A Cool Form Scroller.

Post your comment

Subject:
Message:
0/1000 characters