Solved

Multiple Monitors / Screens

Posted on 2006-11-15
7
420 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
Comment Utility
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
Comment Utility
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
Comment Utility
If Screen->MonitorCount=1 then I'm not sure how to find out the size of the monitors.


--Adrian
0
 

Author Comment

by:enSynergy
Comment Utility
Thats what i need.
0
 
LVL 12

Expert Comment

by:AdrianSRU
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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. …
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: …
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.

762 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

10 Experts available now in Live!

Get 1:1 Help Now