user3110676
user3110676

Reputation: 1

How to resize a win form

I am new to C#. I just created a small C# win form application. After made it's set up file I installed it on my friend's PC and checked it. But when i opened it, most of the buttons in the right side goes out (Can't see in the screen).

I developed the application in my PC(OS: windows 7,Screen resolution 1366x768 display size smaller(100%)). And my friend's PC runs on Windows XP with Screen resolution 1024x768, display size Medium(125). How can i resolve this problem. How can made a C# win form which is compact-able to all screen size and resolutions?

Upvotes: 0

Views: 157

Answers (2)

Kunal Gupta
Kunal Gupta

Reputation: 1

try

this.WindowState = FormWindowState.Maximized;

It will always open the form in maximized state on any screen resolution.

Upvotes: -1

Stefan Koenen
Stefan Koenen

Reputation: 2337

You can go to the designer and select the button. If you don't see a properties window, you can rightclick the button and select the properties option. In the properties you will find a fild named: Anchor, this is holding the buttons on the right place when resizing a form. Go play with it and you will figure it out i think. (I think your solution is to select the right and bottom anchor :)).

Stefan.

Upvotes: 2

Related Questions