I’m trying to figure out a way to know if the user is using multiple monitors.
I would like to know how to do this in native C++ (using the Win32 API) and with managed code (using the .NET Framework).
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I can give you C# .NET:
Edit: A search on Google turned up the following. It mentions 98/ME so it might no be relevant but may point you in the right direction:
There are new APIs for handling multiple monitors in Windows 98. The APIs used in the monitors class sample are GetMonitorInfo, MonitorFromWindow and MonitorFromRect.
The GetSystemMetrics API has some new constants (see below) that can be used to determine the metrics of a multiple monitor system. The GetSystemMetrics API returns information about the Windows environment. This API can be used to determine how many monitors are on the system, whether they are set at the same display format, and the size of the virtual desktop.
http://support.microsoft.com/kb/194578