close
1: private void button1_Click(object sender, EventArgs e)
2: { 3: listBox1.Items.Clear();4: foreach (var screen in Screen.AllScreens)
5: {6: listBox1.Items.Add("Device nAME: " + screen.DeviceName);
7: listBox1.Items.Add("Bounds: " + screen.Bounds.ToString());
8: listBox1.Items.Add("Type: " + screen.GetType().ToString());
9: listBox1.Items.Add("Working Area: " + screen.WorkingArea.ToString());
10: listBox1.Items.Add("Primary Screen: " + screen.Primary.ToString());
11: listBox1.Items.Add("=================================================");
12: } 13: }參考資料:
Find Number and resolution to all monitors
全站熱搜




留言列表
