Solved

Multiple Monitors / Screens

Posted on 2006-11-15
7
422 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to install eclipse SCADA on Linux Debian? 4 145
easiest way to find port number 12 105
Doxygen plugin for Android Studio 1 504
PHPStorm debugging issues 1 23
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now