Solved

Multiple Monitors / Screens

Posted on 2006-11-15
7
428 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
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 use and create keystrokes in Netbeans IDE 8.0 for Windows.

730 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