none
Can you change the default size of new "Windows Form" objects in Visual Basic 2005 to something other than 300x300?

    Question

  • When I start a new "Windows Application" project, or add a new "Windows Form" to an active project, the form design presented is sized to 300x300.

     

    Is there a way to change the default size, e.g., to 600x800?

     

    I don't want to create a "600x800" project to use as a "template". If I do that I have remember to immediately save it under a new name or risk dirtying my template by accident.

     

    Thanks for any insight you can provide.

    Thursday, April 19, 2007 8:27 PM

Answers

  • StevenRB,

     

    1. Create a new Main Form with the default size. Then change the Main new Form to 600x800 and set the Sub form to this size.

     

    2. The new Sub form you create are in the 600x800 size since you have the configuration on the Main form.

    Friday, April 27, 2007 9:04 AM
  • Thank you all for taking time to respond.

     

    The way I did it was to create a "Windows Form" Item Template with the form sized to 800x600. The process is quick, painless, and simple. You just use the "File", "Export Template..." menu.

     

    You could also add this form to a new "Windows Application" project and export that as a new Project Template.

     

    References:

    Customizing Project and Item Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/d7344a0a-d93f-4b69-bbc4-0c2d67ef272b.htm

     

    How to: Update Existing Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/d585e45b-7fe2-45fa-9cf3-7f2bc060f3c4.htm

     

    How to: Locate and Organize Project and Item Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/71f9ed52-c9c9-4818-9bce-c279ffaa0438.htm

     

     

     

    Friday, May 11, 2007 5:22 PM

All replies

  • You can simply set the width and height of the form at start up. Example, add the following in form's Load event

    Me.width=600

    Me.height=800

    Thursday, April 19, 2007 8:31 PM
  • Sorry, if you need to expand the form width at design time, You may think of changing your computer resolution to give you more room.
    Thursday, April 19, 2007 8:34 PM
  • Thanks for the response, but that's not quite what I was asking.

     

    I design to minimum application screen size of 600x800. Every time I start a new project, I have to immediately resize the default 300x300 form to those dimensions before I start adding controls. I wanted to know if there's a way to change the default 300x300 forms size to 600x800 for every new form added to a project.

     

    Thanks.

    Saturday, April 21, 2007 4:10 AM
  • StevenRB,

     

    1. Create a new Main Form with the default size. Then change the Main new Form to 600x800 and set the Sub form to this size.

     

    2. The new Sub form you create are in the 600x800 size since you have the configuration on the Main form.

    Friday, April 27, 2007 9:04 AM
  • Thank you all for taking time to respond.

     

    The way I did it was to create a "Windows Form" Item Template with the form sized to 800x600. The process is quick, painless, and simple. You just use the "File", "Export Template..." menu.

     

    You could also add this form to a new "Windows Application" project and export that as a new Project Template.

     

    References:

    Customizing Project and Item Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/d7344a0a-d93f-4b69-bbc4-0c2d67ef272b.htm

     

    How to: Update Existing Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/d585e45b-7fe2-45fa-9cf3-7f2bc060f3c4.htm

     

    How to: Locate and Organize Project and Item Templates

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vssoln/html/71f9ed52-c9c9-4818-9bce-c279ffaa0438.htm

     

     

     

    Friday, May 11, 2007 5:22 PM