0

Code:

Form2 ConfigForm = new Form2();
ConfigForm.Width = 300;
ConfigForm.Height = 148;
ConfigForm.ShowDialog();

What I get is

http://s3.postimg.org/hyiqmmacj/Test_App2.jpg

Which is totally wrong size.
What it's like in designer, and what shows if I just use ConfigForm.Show() is.

http://s3.postimg.org/x5yq6z277/Test_App1.jpg

Does anyone know why this ocurrs, and how to fix it?

Thanks again for reading my problem.

(edit)

I should add, that if I don't try to set width and height, the result is exactly the same.

Edited by Suzie999

1
Contributor
1
Reply
11
Views
1 Year
Discussion Span
Last Post by Suzie999
0

Sorry for wasting anyones time.

Changing
this.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultBounds;

To
WindowsDefaultLocation

Fixed the issue.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.