Dear All,

Screen Size of my deployment screen is larger than my development screen.

If i try to set my form size larger than my development screen size, IDE doesnot accepts this.

Please let me know How can I use a form larger than my development screen Size?

Pankaj

You can use

Me.WindowState = FormWindowState.Maximized

If that doesn't work. You can try by pulling from the current resolution by:

Me.Width = Screen.PrimaryScreen.Bounds.Width
        Me.Height = Screen.PrimaryScreen.Bounds.Height

You can change the code to smaller by subtracted a value from the width/height code.

You can do this on runtime by placing the code in the form's form_load event.

Dear Begginnerdev,

Thanks for the replies, but soory I did not make my question clear.

I want to increase the size during design time, so that i can place my controls accordingly.

Pankaj

That is fine.

If your deployment resolution is higher than the development resolution you will need to increase the size of form by:

Dragging the size increase handle of the form to the desired fit

or

Viewing the forms size properties and setting the size to the desired amount. This will require panning to the desired area using the scroll bars in form design.


An alternate way is to develop the application within the development resolution and dynamically scale up with the deployment's resolution. You can do this with margins and anchors.

Dear Begginnerdev,

There seems to be a limitation of the screen size which can be set. I cannot drag the size handle beyond a limit and same with the size properties.

I donot want to do it dynamically at run time as I have lots of controls and pictures on form and doing it dynamically will make it messy.

Pankaj

I have found an workaround -

Use a "Panel" on form and set form AutoSrcoll property to true. The "Panel" control seems to have no size limitations.

Pankaj

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.