-3

Can we increase the windows form size more than 1452, 912?

I have to show four data grid views on one single form and I am not able to do it.

5 Answers 5

2

As GvS already told, the problem is the screen resolution. To prove this try the following:

  1. Open any resizeable window (e.g. windows explorer)
  2. Move the window to the left, that you can see approx. 10% of the window
  3. Take the right border and move as far as possible to the right
  4. Restart the procedure from step 2

As you'll see at some point you won't be able to enlarge the window any more in its width. Now move the window again, so that the right border of the window will touch the right border of the screen. Now you can see that the window will perfectly fit over the whole width of your screen(s) (What i forget, was that you have multiple monitors, you can resize it over all screens).

So, how to accomplish these problems?? Take the hint of Xstahef. Design your form for a common screen resolution (normally 1024x768, maybe only 800x600) and don't forget to substract the size of the taskbar ;-). Then use the Anchor and Dock properties of your controls, so their size can change between different resolutions.

Also take a look into the usage of TableLayoutPanel or FlowLayoutPanel. These can be very helpful if you like to get two (or more) controls, which should change their size.

1
  • yes dude you r rite..i can understand that. but im thinking in such a way that keeping max size as 2000,2000 in the properties(even though the normal window size is 1400*900) 1.adding a pane(or group box) and on that a datagrid, 2.and adding one another pane and a datagrid ...and so on Now in the program while loading the tabbed page(which has a scroll bar)can we set the the locations of this datagrids with respect to the screen resolution of 2000 by 2000? please dont hesitate im asking rong one.and lemme know if there is such way to do it. thanx srinivas
    – srinivas
    Jul 16, 2009 at 8:40
2

Windows will put a limit on you form/windows size. You cannot make it larger as the screen resolution.

EDIT: So you want to be able to work with a canvas of 2000x2000, and place your controls on that. I would create a usercontrol, size this 2000x2000, and work with this.

You can add the usercontrol into your form.

You can use scrollbars, to scroll the interior of your form. But will this make your users happy?

1
  • hi gvs, here im putting my form in tabular page.im using scroll bar even,but still the form size is 1452*912
    – srinivas
    Jul 16, 2009 at 7:42
0

YES WE CAN

Properties that might be of interest to you: Size, MaximumSize

Maybe your forms are inherited and the parent form limits its size to 1452,912?

Cheers

0

Think about anchors and dock properties.

An interesting link about winform size:

http://msdn.microsoft.com/en-us/library/system.windows.forms.systeminformation.maxwindowtracksize.aspx

0

Consider doing one of the following instead:

  1. use a tabcontrol and place each datagrid on a separate tab
  2. use a scrollable panel and allow the user to scroll the view to see more datagrids

Not the answer you're looking for? Browse other questions tagged or ask your own question.