hi all, cant we increase the windows form size more than 1452, 912..coz i have to show four data grid views on one single form and im not able to do it.
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
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?
Think about anchors and dock properties.
An interesting link about winform size:
As GvS already told, the problem is the screen resolution. To prove this try the following:
- Open any resizeable window (e.g. windows explorer)
- Move the window to the left, that you can see approx. 10% of the window
- Take the right border and move as far as possible to the right
- 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.
Consider doing one of the following instead:
- use a tabcontrol and place each datagrid on a separate tab
- use a scrollable panel and allow the user to scroll the view to see more datagrids