Q:

How to make a screen resolution aware program in WinForms

Hi everyone i have a problem, i designed a program in a enviroment where the screen resolution is  1600x900, the problem is that when i tried to execute the program in other resolutions for example 1366x768 all my buttons, panels etc, are cropped by the window, here a example  at 1600x900 Example   and here at 1366x768  Example i used anchor and fill properties but it doesn't  work, do you know any property or solution for solve this, i will be very grateful

A:

core property  also try to use split container it will automatically resize your form as per resolution
try to use this code on form load
public void abrunden(object was, int x, int y, int width, int height, int radius)
{

    System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();

    gp.AddLine(x + radius, y, x + width - radius, y);
    gp.AddArc(x + width - radius, y, radius, radius, 270, 90);
    gp.AddLine(x + width, y + radius, x + width, y + height - radius);
    gp.AddArc(x + width - radius, y + height - radius, radius, radius, 0, 90);
    gp.AddLine(x + width - radius, y + height, x + radius, y + height);
    gp.AddArc(x, y + height - radius, radius, radius, 90, 90);
    gp.AddLine(x, y + height - radius, x, y + radius);
    gp.AddArc(x, y, radius, radius, 180, 90);
    gp.CloseFigure();

    was.region = new System.Drawing.Region(gp);
    gp.Dispose();
}

to call this Use following 

use one panel in form dock this with form
pass panel name width and height to method

abrunden(panWarten, 0, 0, _with1.Width, _with1.Height, 20);

this will make form responsive as per screen 

