|
-
Jul 10th, 2002, 01:53 AM
#1
Thread Starter
Addicted Member
changing minimum form size at run time
I have a form in VB.NET which uses docking etc to change the size of controls and the form etc at run time. However, I cant seem to set the minimumsize parameters of the form at run time - only at design time. I was trying to do this
me.minimumsize.width=x
in the form_load event but it don't like it
says "Expression is a value and therefore cannot be the subject of an assignment" ??
Does anyone know if I am doing something wrong or is there a way around this ??
-
Jul 10th, 2002, 08:27 AM
#2
Registered User
just say
that works...
jeff
-
Jul 10th, 2002, 06:29 PM
#3
Thread Starter
Addicted Member
Gday Jeff.
thanks for the reply but it dosn't work in VB.NET. I am trying to stop the user from resizing the form smaller than what is was loaded as. Anyway, I've found how to do it now. The command in the form_load event is
Me.MinimumSize = New System.Drawing.Size(Me.Width, Me.Height)
as the height and width properties of the form are now read only
Just a small change from VB6
regards
Bh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|