Detect Multiple Monitors
By Sergey - Posted on January 1st, 2008
The GetSystemMetrics WIN API can be used to get the number of monitors. Some other constants related to multi-monitor PC configurations are also included.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
#DEFINE SM_XVIRTUALSCREEN 76 #DEFINE SM_YVIRTUALSCREEN 77 #DEFINE SM_CXVIRTUALSCREEN 78 #DEFINE SM_CYVIRTUALSCREEN 79 #DEFINE SM_CMONITORS 80 DECLARE INTEGER GetSystemMetrics IN user32 INTEGER nIndex lnNonitors = GetSystemMetrics(SM_CMONITORS) ? lnNonitors
Recent comments
4 days 14 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 4 days ago
1 week 5 days ago
2 weeks 5 days ago
2 weeks 5 days ago
3 weeks 1 day ago
3 weeks 1 day ago
3 weeks 3 days ago