我想知道winform显示器是否可以找到并显示当前显示的当前屏幕分辨率?
例如,如果我的屏幕是1920 x 1080,它会在标签或打印行中显示.虽然后一部分是我知道如何做的事情.
有人可以告诉我,如果winform有可能找到这些数据吗?
使用Screen类
label1.Text = string.Format("Primary screen size = {0}x{1}",
Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height);
Run Code Online (Sandbox Code Playgroud)