Multiple Monitors / Screens

I have a computer set up with two monitors. The system as I understand it stretches the desktop resolution over both monitors to give the appearance of two screens.

When my program Maximizes It goes over both screens. Is there any way in borland builder to restrict it to one.

I know how to overide the maximize function to restrict size... I just need to know if there is any way to find out the size of each screen.
enSynergyAsked:
Who is Participating?
 
AdrianSRUConnect With a Mentor Commented:
If Screen->MonitorCount=1 then I'm not sure how to find out the size of the monitors.


--Adrian
0
 
AdrianSRUCommented:
The following descriptsion are from the C++ Builder help file:

Screen->Monitors - Use Monitors to access an individual monitor used to comprise the desktop.  The Monitor with the zero index is the primary monitor.
Screen->MonitorCount - Use MonitorCount to determine the number of monitors used to comprise the desktop.

Screen->Monitors[ 0 ]->Left - In multi-monitor applications, the available screen space can span multiple monitors from left to right.  Read Left to determine where, in the entire available screen space, this monitor appears.
Screen->Monitors[ 0 ]->Top - In multi-monitor applications, the available screen space can span multiple monitors from top to bottom. Read Top to determine where, in the entire available screen space, this monitor appears.
Screen->Monitors[ 0 ]->Width -  Read Width to learn the size of the monitor in pixels.  Use this value along with the Left property to calculate vertical positions for objects in multi-monitor applications.
Screen->Monitors[ 0 ]->Height - Read Height to learn the size of the monitor in pixels. Use this value along with the Top property to calculate how to position objects vertically in multi-monitor applications.


--Adrian
0
 
enSynergyAuthor Commented:
Yes this is ok if you set up youre system with multiple desktops. But the problem is the desktop has been expaned over two screens, Not seperate desktops. I need to know is there any way to find out how many screens the desktop is stretched over.
0
 
enSynergyAuthor Commented:
Thats what i need.
0
 
AdrianSRUCommented:
Are your monitors going to be the same size?  If so then you could check the screen size and compare it to multiples of some common sizes:

800x600 - one monitor
1600x600 - two monitors
...
1024x768 - one monitor
2048x768 - two monitors
...
1152x864 - one monitor
2304x864 - two monitors
...

It may not be the most elegant solution, but if your monitors will be the same size you can make it work with enough checks.


--Adrian
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.