Superfly1611 Posted April 6, 2004 Posted April 6, 2004 How do you lock the size of your windows forms? I've tried giving it a defined width and setting the "Locked" property = True but it's just not working. Yet the description of the Locked Property is "The locked property determines if we can move or resize the control" I must be missing something? Quote
Arch4ngel Posted April 6, 2004 Posted April 6, 2004 set FormBorderStyle to FixedSingle. User won't be able to resize it anymore Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Gladimir Posted April 6, 2004 Posted April 6, 2004 A Workaround? How do you lock the size of your windows forms? I've tried giving it a defined width and setting the "Locked" property = True but it's just not working. Yet the description of the Locked Property is "The locked property determines if we can move or resize the control" I must be missing something?I know this is not really an answer, but one possible workaround might be to set the Height and Width properties to your pre-defined size in the Resize event. It's not perfect, but at least the Form will always "snap" back to the desired size until you get a real answer. Quote Never ascribe to malice that which is adequately explained by incompetence. - Napoleon Bonaparte
Superfly1611 Posted April 6, 2004 Author Posted April 6, 2004 Good idea Gladimir - but thats just a work around Arch Angel came up with a solution Thanks anyway Quote
Arch4ngel Posted April 6, 2004 Posted April 6, 2004 That is what we call a patch. A solution that you use when you don't know how to make it work by conventionnal way. :p Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
*Experts* DiverDan Posted April 6, 2004 *Experts* Posted April 6, 2004 You can also set the form's minimum and maximum size to your set value either in designer or runtime modes, but the FixedSingle border style is really the "best" solution for the user. Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Arch4ngel Posted April 6, 2004 Posted April 6, 2004 Yep. Minimum and maximum size are used in WMP. When you have a content in the center that can be expanded and that on the border there's menu. Minimum and Maximum are used to make sure that menu will still be available. They are a way better use than on the Resize (unless you don't "see" the resize). But the best for this solution still FormBorderStyle to FixedSingle Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.