ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

RFI: Win32 API or WMI means of manipulating multiple video displays/monitors.

(1/4) > >>

Help me Obi-Wan KenCody!

Here is what I want to automate...

It just so happens that I was looking for a way to do this today via AutoIt (or something similar) and was in the middle of researching it, when one coworker walked up to another coworker at the desk next to mine and asked if he knew of a way to do the same thing I was researching. So, If you help me, you will be helping two more via proxy.  :Thmbsup:

Here is the simple scenario:
I have a laptop. Sometimes I am only using my laptop's build in display. Other times I have an external monitor connected and I want to "Extend my Windows desktop onto this monitor." so I can use both displays. I am getting tired of having to do this manually. And then manually again to reverse things.

I have found some info on MSDN, but it is only for getting/setting display resolutions. I can't track down the API or WMI calls that are behind the Display Properties dialog. At this point I may have to employ a Windows API spy program unless I can find some documentation.

Have any of you gurus come across this info in your travels?

Ralf Maximus:
I've got a VB6 class that allows reading of the system monitors object collection, and I *think* it allows writing to it too.  I use it all the time in my projects, but only for determining the user's multi-monitor environment.

Let me look at the code and see if I can discern the underlying stuff it's calling.  If so, I'll provide a translation into generic APIese. 

Or are you fluent enough in VB6 for me to just post the class?

Oh man this would be sooooooo cool!

I hate those dialogs, they are a complete mess, specialy if you have an ati card, which forces you to close and open that dialog several times each time you want to go from single screen to dual-screen.
I'll keep monitoring this thread ;)


Thanks. That would be a great help.

Or are you fluent enough in VB6 for me to just post the class?
-Ralf Maximus (December 17, 2007, 01:29 PM)
--- End quote ---

I can read VB6 code. I learned to do that while working for Borland supporting Delphi. We would find examples in MSDN and port them over to Delphi.

Oh man this would be sooooooo cool!
-jgpaiva (December 17, 2007, 01:43 PM)
--- End quote ---
If I get this working I will turn it into a Coding Snack for you jgpaiva.


[0] Message Index

[#] Next page

Go to full version