|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Restricting the resizing of formsI'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. 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. 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. > 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. -- Show quoteHide quoteDennis in Houston "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. > > > > > Jacob.Bru***@ec.gc.ca wrote:
> I've been unable to find a simple answer to what I initially thought You have two options... If you don't want the form resized at all,> 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. 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
Hiding a Property
LAN IP Visual Basic beginner question Writing a brute force program using SendKeys.Send self-extracting files in .net AxSHDocVw.AxWebBrowser events String quickie: Remove trailing space from each RichTextBox line? Adding row to data table in .net 2.0 VB2005: Error Using a Separate Search Form how to open a form in C# |
|||||||||||||||||||||||