Home All Groups Group Topic Archive Search About

Restricting the resizing of forms

Author
8 Sep 2006 2:58 PM
Jacob.Bruxer
I've been unable to find a simple answer to what I initially thought
was going to be a simple question.  I want to be able to restrict the
size of my forms in a VB.net project.  I don't want users to be able to
make the forms either smaller or bigger than the size I've set them at.
How is this done?
Thanks.

Author
8 Sep 2006 3:12 PM
S Kachru
Look at the FormBorderStyle property of the form.




Show quoteHide quote
> I've been unable to find a simple answer to what I initially thought
> was going to be a simple question.  I want to be able to restrict the
> size of my forms in a VB.net project.  I don't want users to be able
> to
> make the forms either smaller or bigger than the size I've set them
> at.
> How is this done?
> Thanks.
Author
8 Sep 2006 3:30 PM
Darhl Thomason
In the form's properties, set FormBorderStyle to one of the "Fixed" options
(each as a different look), MaximizeBox to False, and MinimizeBox to False.
You will be left with a form that is not sizeable and has no maximize or
minimize buttons, only an "X" in the corner.  If you don't want the "X"
either, set the ControlBox to False.

d


<Jacob.Bru***@ec.gc.ca> wrote in message
Show quoteHide quote
news:1157727500.290040.224850@p79g2000cwp.googlegroups.com...
> I've been unable to find a simple answer to what I initially thought
> was going to be a simple question.  I want to be able to restrict the
> size of my forms in a VB.net project.  I don't want users to be able to
> make the forms either smaller or bigger than the size I've set them at.
> How is this done?
> Thanks.
>
Author
8 Sep 2006 3:51 PM
Dennis
In the forms "Layout" event, you can check the form's location and size then
reset both the location and/or size if the user has exceeded your
restrictions.
--
Dennis in Houston


Show quoteHide quote
"Darhl Thomason" wrote:

> In the form's properties, set FormBorderStyle to one of the "Fixed" options
> (each as a different look), MaximizeBox to False, and MinimizeBox to False.
> You will be left with a form that is not sizeable and has no maximize or
> minimize buttons, only an "X" in the corner.  If you don't want the "X"
> either, set the ControlBox to False.
>
> d
>
>
> <Jacob.Bru***@ec.gc.ca> wrote in message
> news:1157727500.290040.224850@p79g2000cwp.googlegroups.com...
> > I've been unable to find a simple answer to what I initially thought
> > was going to be a simple question.  I want to be able to restrict the
> > size of my forms in a VB.net project.  I don't want users to be able to
> > make the forms either smaller or bigger than the size I've set them at.
> > How is this done?
> > Thanks.
> >
>
>
>
Author
8 Sep 2006 3:47 PM
Tom Shelton
Jacob.Bru***@ec.gc.ca wrote:
> I've been unable to find a simple answer to what I initially thought
> was going to be a simple question.  I want to be able to restrict the
> size of my forms in a VB.net project.  I don't want users to be able to
> make the forms either smaller or bigger than the size I've set them at.
>  How is this done?
> Thanks.

You have two options...  If you don't want the form resized at all,
then look at one of the Fixed* styles in the forms FormBorderStyle
property.  If you want to let the form resized, but you want to set
limits on the maximum/minimum size, then look at the forms MaximumSize
and MinimumSize properties.

--
Tom Shelton