private void ScaleWindow()
{
float w = 1920;//你当前的分辨率宽
float h = 1080;//你当前的分辨率高
Rectangle rect = Screen.PrimaryScreen.Bounds;
float ww = rect.Width / w;
float wh = rect.Height / h;
SizeF sf = new SizeF(ww, wh);
this.Scale(sf);
}
private void Form1_Load(object sender, EventArgs e)
{
ScaleWindow();
}