Jump to content
Sign in to follow this  
WorknMan

Anything out there to work with dual monitors?

Recommended Posts

WorknMan

Specifically, I want to write a script that will move any apps/windows running on the secondary monitor over to the primary.

Share this post


Link to post
Share on other sites
AdmiralAlkex

You forgot to ask a question there, so I will just assume you need some pointers to begin with.

Open the helpfile and look at:

WinList = to get all windows

WinGetPos = get window positions

WinMove = move window

Remember to use the handle returned from WinList, and not the title as that wont work if you have multiple windows named the same.

And when you get more advanced and want to move windows when they are created and such, look at Easy shell hooking example.

Share this post


Link to post
Share on other sites
Ascend4nt

Check out 'Multiple Display Monitors Functions' on MSDN at http://msdn.microsoft.com/en-us/library/dd145072%28v=VS.85%29.aspx

A short article on what defines the primary monitor: The Old New Thing: How do I get the handle of the primary monitor?

There's also EnumDisplaySettings and EnumDisplayDevices functions you can lookup on MSDN.

I haven't worked with this stuff myself yet, only with virtual (combined) screen width/heights.

Share this post


Link to post
Share on other sites
water

I use SplitMon. Have a look at the source and you will see what can be done with dual monitors :idea:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.