[RESOLVED] Form is resizable when it shouldn't be
I have a FixedSingle Form (I actually wan't to simulate the MessageBox). Only if i disable the ControlBox property the Form can be resized.
I have tried VB6 also (just for comparison), where everything is "OK" (as I expected it to work for me).
Could this be a bug? It's a 2.0 framework btw.
:ehh:
Re: Form is resizable when it shouldn't be
This code makes the form non-resizable for me (VS 2010):
Code:
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
Me.ControlBox = False
Just checked on VS 2008 - the same, everything works fine.
Re: Form is resizable when it shouldn't be
I just tried this out using VS2008 with the 3.5 Framework and while I can't resize the form under the same sort of settings, I can maximise it by double clicking on the header which I wouldn't have thought would have been appropriate.
A quick work around might be to set the MinimumSize and MaximumSize to the same size as you want your form.
I hope that this helps
Satal :D
Re: Form is resizable when it shouldn't be
Add this then (maximizing / minimizing is not resizing in terms of Windows message pump):
Code:
Me.MaximizeBox = False
Me.MinimizeBox = False
Re: Form is resizable when it shouldn't be
Thanks cicatrix, didn't realise that hiding the Min/Max boxes actually stopped the ability to maximize :)
Re: Form is resizable when it shouldn't be
Found the problem. It is actually in my skin :blush:
Thank you anyways :wave: