How do I make my form expand gardually with a press of a button and get retracted again by pressing another button. ?
Printable View
How do I make my form expand gardually with a press of a button and get retracted again by pressing another button. ?
Add a timer to your form and do something like this
You can change the Timer interval and/or the factor.VB Code:
Option Explicit Private gintFactor As Integer Private Sub cmdDecrease_Click() gintFactor = -25 End Sub Private Sub cmdIncrease_Click() gintFactor = 25 End Sub Private Sub Form_Load() Timer1.Interval = 200 End Sub Private Sub Timer1_Timer() Me.Height = Me.Height + gintFactor Me.Width = Me.Width + gintFactor End Sub