Display Settings - Dual Monitor API

M

Mark

Experts -

I have a laptop running XP docked to a dual monitor
setup. I find it quite annoying that even when I undock,
I am still on dual monitor setting, which means some of
my apps are on the hidden screen and thus unusable.

I have to mannually go to the 'display settings' and
change it to single monitor mode by not 'extending the
desktop' to my 2nd monitor.

I am figuring that there has to be an easy way to make
the configuration occure automitically, OR that there is
a Windows API that I can use to change the settings
programatically by embedding it in some script that I run
off a button or something.....

Can anyone help me? I've tried finding resources on this
and have come up with absolutley nothing.

thanks,
Mark
 
C

CJ Taylor

Well, you "could" write something like this, I don't know what exists for it
already. But watch the message loop (I don't know what message to watch
for) for an undocked message. I think you can play with your display
settings from some namespaces in .NET, I dunno.

but even if you can't, upon parsing that message, just get a list of all
your open windowd applications, grab the handles and set all there Top and
Left properties to 0,0

Kinda ghetto, but it would work...

You could even persist the viewstate of those windows from docking to
undocking in a simple property bag. That way, when docked again, you could
move them all back to there original position.

I may get bored and try this later...
 
C

Charlie Smith

Mark,

My experience with this issue is that it is driver dependant. Some
drivers detect the change and handle it gracefully, and some don't. I
wish I had an answer for this but I have found it to be directly
related to your video card and driver. Hopefully CJ's suggestion is
helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top