{"id":317,"date":"2010-07-08T13:10:16","date_gmt":"2010-07-08T13:10:16","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=317"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"monitors-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/forms\/screen-size-and-location\/monitors-general","title":{"rendered":"Monitors General"},"content":{"rendered":"<h4>Minimum Screen Size To Design For<\/h4>\n<p>Netbooks often use 1024 x 600 screen resolution.<br \/>\nWindows 7 taskbar is 40 pixels high (?), however a netbook user is likely to set the taskbar to auto hide.<\/p>\n<h4>Single Monitor Systems<\/h4>\n<pre><code>\r\n\tint height = Screen::PrimaryScreen-&gt;Bounds.Height;\r\n\tint width = Screen::PrimaryScreen-&gt;Bounds.Width;\r\n\r\n\tScreen ^PrimaryScreen = Screen::PrimaryScreen;\r\n\tthis-&gt;Width = PrimaryScreen-&gt;WorkingArea.Width;\r\n<\/code><\/pre>\n<h4>Multiple Monitor Systems<\/h4>\n<pre><code>\r\n\tint monitors = Screen::AllScreens-&gt;Length;\r\n\tint height = Screen::AllScreens[0]-&gt;Bounds.Height;\r\n\tint width = Screen::AllScreens[0]-&gt;Bounds.Width;\r\n<\/code><\/pre>\n<h5>Get The Current Screen Details &#8211; The Screen A Form Is On<\/h5>\n<pre><code>\r\n\tScreen ^OurScreen = Screen::FromControl(this);\r\n\tint height = OurScreen-&gt;Bounds.Height;\r\n\tint width = OurScreen-&gt;Bounds.Width;\r\n<\/code><\/pre>\n<h4>Coordinates \/ Determining Screen Used<\/h4>\n<p>Top left of the primary screen is 0,0<br \/>\nIf there are multiple monitors and a screen is to the left then its Left coordiante will be negative.<br \/>\nTherefore this makes it simple to ensure that your applicaiton appears on a primary monitor or to detect if you application is on a seconday monitor (Left &lt; 0 or Left &gt; Primary screen width)<\/p>\n<p>Good resource:<br \/>\n<a href=\"http:\/\/www.codeproject.com\/KB\/miscctrl\/multimonformlocations.aspx\">http:\/\/www.codeproject.com\/KB\/miscctrl\/multimonformlocations.aspx<\/a><\/p>\n<h4>Reading Details Of All System Screens<\/h4>\n<pre><code>\r\n\tint index;\r\n\tint upperBound;\r\n\r\n\t\/\/ Gets an array of all the screens connected to the system.\r\n\tarray^screens = Screen::AllScreens;\r\n\tupperBound = screens-&gt;GetUpperBound(0);\r\n\tfor (index = 0; index &lt;= upperBound; index++) \t{ \t\t\/\/ For each screen, add the screen properties to a list box. \t\tlistBox1-&gt;Items-&gt;Add(String::Concat(\"Device Name: \", screens[index]-&gt;DeviceName) );\r\n\t\tlistBox1-&gt;Items-&gt;Add(String::Concat(\"Bounds: \", screens[ index ]-&gt;Bounds));\r\n\t\tlistBox1-&gt;Items-&gt;Add(String::Concat(\"Type: \", screens[ index ]-&gt;GetType()));\r\n\t\tlistBox1-&gt;Items-&gt;Add(String::Concat(\"Working Area: \", screens[index]-&gt;WorkingArea));\r\n\t\tlistBox1-&gt;Items-&gt;Add(String::Concat(\"Primary Screen: \", screens[index]-&gt;Primary));\r\n\t}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Minimum Screen Size To Design For Netbooks often use 1024 x 600 screen resolution. Windows 7 taskbar is 40 pixels high (?), however a netbook user is likely to set the taskbar to auto hide. Single Monitor Systems int height = Screen::PrimaryScreen-&gt;Bounds.Height; int width = Screen::PrimaryScreen-&gt;Bounds.Width; Screen ^PrimaryScreen = Screen::PrimaryScreen; this-&gt;Width = PrimaryScreen-&gt;WorkingArea.Width; Multiple Monitor [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-317","post","type-post","status-publish","format-standard","hentry","category-screen-size-and-location"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":4,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":1101,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/317\/revisions\/1101"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}