It lets me reduce the height, but it will not let me set it over 1036.
I need to set the form size to about 856 x 1100. (The details on the form
are intended to be printed out on A4 paper).
(I'm wondering if 1036 is the usual height that is used, and that I'm having
problems because I'm trying to print a bit closer to the top & bottom of the
page than usual)
Does anyone have any suggestions ?
Thanks, Ian. (C#)
Forms must not be larger than the screen.
Herfried K. Wagner [MVP]
All properties and methods to set the size of the form finally call
SetBondsCore method. This method is declared in the Control class. Control's
implementation doesn't restrict you to set bigger sizes for the control, but
unfrotunately that method is virtual and the Form class overrides it and
add one adjustment of the size when the form is in Normal window state not
to be bigger than SystemInfo.MaxWindowTrackSize.
As long as in C# we cannot call base-base method you cannot skip that
The only thing you can do is to use PInvoke and call say MoveWindows to
chage the size
static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int
nHeight, bool bRepaint);
private void button1_Click(object sender, System.EventArgs e)
MoveWindow(this.Handle, 0,0, 2000, 2000, true);
//Call UpdateBounds in order form to relayout its controls
Don't forget to set form's MaximumSize property to some bigger value
100 [C# MVP]
"ian" <ian_mi...@proteria.com> wrote in message