Ste*_*eve 35

检查Screen类及其属性Bounds

Screen.PrimaryScreen.Bounds.Width;
Screen.PrimaryScreen.Bounds.Height;
Screen.PrimaryScreen.Bounds.Size;
Run Code Online (Sandbox Code Playgroud)

  • 注意:在MULTIPLE MONITOR系统上,您可能想要知道的是特定表格所在的屏幕尺寸.为此,请使用Screen.FromControl(myForm).有关详细信息,请参阅http://stackoverflow.com/questions/2402739/how-to-retrieve-the-screen-resolution-from-ac-sharp-winform-app. (14认同)