C#窗体根据分辨率自动调整大小

2025-04-14 11:46:14
推荐回答(1个)
回答1:

SystemInformation.WorkingArea.Width.ToString() SystemInformation.WorkingArea.Height.ToString()
这是取得当前的屏幕除任务栏外的工作域大小
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width.ToString() System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height.ToString()
这是取得当前的屏幕包括任务栏的工作域大小

呵呵,设置窗体大小你应该会了吧