Locking form resizing

blumonde

Well-known member
Joined
Jul 26, 2005
Messages
68
Programming Experience
Beginner
Gentlemen,

Is there a way to lock a form's borders so that users cannot resize it with their mouse during runtime?

Please help.

blumonde
 
Last edited:
ayozzhero said:
Try something like:
VB.NET:
[color=blue]Me[/color].FormBorderStyle = FormBorderStyle.FixedSingle
Hope this helps...

Thank you ayozzhero. It sure helps. :)

I was looking for something relating to borders in the properties window of visual studio but didn't see any. I guess we have to code it in this case.

Thanks again.

Cheers,

blumonde
 
in the properties window it's the FormBorderStyle there's a dropdown list of available choices, FixedSingle is one of the options in that list too
 
Hiya Jugga and kulrom :)

I set maximizebox to false, yes of course. About formborderstyle, I overlooked. It was there but for some reason I didn't see it. My eyes are getting worse now. Sorry.

Thanks for the tips, everyone.

Cheers,

blumonde
 
When I set borderstyle to fixed single, the form loses the 3D look that I'd like the border to have. How can I lock the form (prevent resizing or moving) while still maintaining the look of a window?
 
hahahaha FormBorderStyle.Fixed3D
 
Thanks, I've tried that, but the user can still move the form window.
I DID, however, find some code at the FAQ site that's advertised here.

I put this code (after modifying it a bit) into each one of my forms and the user indeed cannot move it, AND I get to keept the fixed Dialogue look!

Appreciate the reply, though. I've got a million questions coming!!!:)
 
Thanks! The code I used is the same code in your link. good to know I'm on the same page. It works like a charm!:)
 
Back
Top