Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to detect when two monitors are being used 7

Status
Not open for further replies.

AncientTiger

Programmer
Jul 5, 2001
238
0
0
US
Scratching my head on this one...

Some of my customers have a dual-screen setup at their workstations, and some have a single screen.

I've got a VB6 program that "remembers" the last screen position and resumes it's location the next time the user starts it up.

The problem is that sometimes my dual-screen people log onto one of the single screen PC's and the program starts up WAY off the right side of the screen.

Is there a way for me to detect if the computer being used is a dual-screen computer, or a single screen so that I can adjust the startup position accordingly?

And yes...I'm ready to slap my forehead from the OBVIOUS answer ;)

------------------------------------
[yinyang] Over 20 years of programming, and still learning every day! [yinyang]
 
I once made a vb6 'video wall' program with 6 monitors.
The video outputs usually come in pairs. 1&2 are on one adapter, 3&4 on another 5&6 on another etc (even on 4 port cards)
Only problem I could never solve is if you remove the first monitor from any pair (for maintenance)and the computer is restarted, the picture for the second jumps to the first position.
This makes the video wall even more odd if one primary monitor is missing for a period while it is being maintained.
Is there any way of locking a picture in a sort of 'virtual coordinate position' when this happens?

With Windows 7, this is even worse because the picture jumps as soon as you disconnect an output without even turning off the computer.
 
I don't think this will be easy. Multiple monitors can only be set in Windows in such a way that all monitors are 'connected' to each other forming a closed polygon. In other words, you should be able to move the mouse from any visible pixel to other without jumping or skipping anywhere. There shall be no gaps or isolated blocks.

So if 3 monitors are arranged in a side-by-side configuration, it will not be possible for the third monitor to maintian its position if the middle one is removed. It will be automatically snapped to the edge of the first monitor.

There are some virtual display drivers like ZoneScreen, which allow you to setup a virtual display, viewable on the same machine or remotely over the network. I used it to test multi-monitor applications on my computer with single display.

You can substitute the display removed for maintenance with a virtual display so that Windows thinks a display is still present in that area and does not try to relocate other displays to remove the gaps.

I am not sure how well these virtual displays work on Windows 7. I used them on Windows XP and they worked well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top