?
Solved

Multiple Monitors / Screens

Posted on 2006-11-15
7
Medium Priority
?
437 Views
Last Modified: 2013-11-17
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.
0
Comment
Question by:enSynergy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 12

Expert Comment

by:AdrianSRU
ID: 17946992
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
 

Author Comment

by:enSynergy
ID: 17955004
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
 
LVL 12

Accepted Solution

by:
AdrianSRU earned 2000 total points
ID: 17955268
If Screen->MonitorCount=1 then I'm not sure how to find out the size of the monitors.


--Adrian
0
 

Author Comment

by:enSynergy
ID: 17955290
Thats what i need.
0
 
LVL 12

Expert Comment

by:AdrianSRU
ID: 17955489
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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question