Click to See Complete Forum and Search --> : VB Forms


James Doherty
February 11th, 2000, 05:49 AM
How can i restrict the size of a form?
The 'Resize' event seems a bit late, and the results look awful.

February 11th, 2000, 06:00 AM
You will need to subclass it.
go to www.mvps.org/vbnet where Randy Birch has an example of how to achieve this.

Johnny101
February 11th, 2000, 12:59 PM
If you dont want the user to be able to resize the form at all, set the border style property to 1 - Fixed Single. If you want the user to be able to resize the form, but only within a range, then the resize event is about the only other easy solution. I know there are some API calls that can stop the flicker, but I'm not familiar with them. I'm sure someone else here knows what they are.

Good luck,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com

Starcraft
February 11th, 2000, 02:05 PM
'hope this helps
Private Sub Timer1_Timer()
If Form1.Height > 4260 Then
Form1.Height = 3300
End If
End Sub