by Sum1Else (6 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
Keeps the form the same size no matter what, while your form can still look good with the MIN/MAX buttons....Makes a cool effect when those buttons are Pressed
Assumes
Make:
A form called Form1
2 text box called H and W
A timer called timer1
Leave all defaults
Private Sub Form_Load()
Form1.WindowState = vbDefault
Timer1.Enabled = True
Timer1.Interval = 1
H.Visible = False
W.Visible = False
H.Text = Form1.Height
W.Text = Form1.Width
End Sub
Private Sub Timer1_Timer()
If Form1.WindowState = vbMaximized Or Form1.WindowState = vbMinimized Then
Form1.WindowState = vbDefault
Else
Form1.Height = H
Form1.Width = W
End If
End Sub