windows form sizing
-
hello, I am creating a windows form app using VS.Net and I am having a fundamental problem with window sizing. I would like to specify the exact size of each form programmatically. Despite my efforts, the forms seem to be resizing themselves sometime between when the constructor is run and the window is actually displayed. Does anybody know why or where in the code this is happening? Any insight would be much appreciated. Thanks!!! rc
-
hello, I am creating a windows form app using VS.Net and I am having a fundamental problem with window sizing. I would like to specify the exact size of each form programmatically. Despite my efforts, the forms seem to be resizing themselves sometime between when the constructor is run and the window is actually displayed. Does anybody know why or where in the code this is happening? Any insight would be much appreciated. Thanks!!! rc
If you post some code I might be able to help. Programatically setting the .Size, .Height, or .Width properties of the form works if the values are within the .MaximumSize and .MinimumSize properties.
-
hello, I am creating a windows form app using VS.Net and I am having a fundamental problem with window sizing. I would like to specify the exact size of each form programmatically. Despite my efforts, the forms seem to be resizing themselves sometime between when the constructor is run and the window is actually displayed. Does anybody know why or where in the code this is happening? Any insight would be much appreciated. Thanks!!! rc
Find something like that in Windows Form Designer generated code section.
this.ClientSize = new System.Drawing.Size(30, 373);
But even if you comment this code, designer'll generate it again. It'd be better to override OnLoad methods, where set the size of the form.