WinForms size incorrect

Viewed 16

So i got some code which is suposed to make a picture box stay the same size as the window.

I was trying to use px.Dock = DockStyle.Fill but that only filled the tope left quarter of the window.

I tried to use the ClientSize variable, the Size variable etc of the window.

Then i noticed that the window detected itself as 1721 pixel wide, when maximized... My monitor is 3840 pixels wide so that cannot be true.


Debug.WriteLine("Window: " + f.Size);

Prints:
Window: {Width=1727, Height=980} (when maximized)

Any help appreciated!

0 Answers
Related