How can i restrict the size of a form?
The 'Resize' event seems a bit late, and the results look awful.
Printable View
How can i restrict the size of a form?
The 'Resize' event seems a bit late, and the results look awful.
You will need to subclass it.
go to www.mvps.org/vbnet where Randy Birch has an example of how to achieve this.
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
'hope this helps
Private Sub Timer1_Timer()
If Form1.Height > 4260 Then
Form1.Height = 3300
End If
End Sub