By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,760 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,760 IT Pros & Developers. It's quick & easy.

Display Settings - Dual Monitor API

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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...
"Mark" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
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

Nov 20 '05 #2

P: n/a
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.

"Mark" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
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.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.