468,244 Members | 1,808 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,244 developers. It's quick & easy.

Display Settings - Dual Monitor API

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
2 3302
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
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.

Similar topics

10 posts views Thread by KJM | last post: by
2 posts views Thread by Renganathan | last post: by
4 posts views Thread by simchajoy2000 | last post: by
5 posts views Thread by Joe-Paul | last post: by
3 posts views Thread by rsr | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.