Search Tools Links Login

I Don't Think So Buddy!


Visual Basic 6, or VB Classic

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

Original Author: Sum1Else

Assumptions

Make:
A form called Form1
2 text box called H and W
A timer called timer1
Leave all defaults

Code

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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 88 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.