Jump to content
Sign in to follow this  
yucatan

Winmove Second Screen

Recommended Posts

yucatan

Hello guys i have a window i want to move that window to the center of my second monitor.

i want it to work with any resolution.

how can i do this?

greetz Yucatan

Share this post


Link to post
Share on other sites
Paulie

Well, the @DektopWidth and @DesktopHeight Macros will return the resolution of your primary monitor. For me though, because both of my monitors are the same resolution, I could move a window to the center of the 2nd monitor like this:

$size = WinGetPos("Title", "Text")
$Width = $size[2]
$Height = $size[3]
WinMove("Title","Text", @DesktopWidth+(@DesktopWidth/2) - ($Width/2), (@DestopHeight/2)-($Height/2))

You could try this. If both of your monitors are the same resolution it should work

Edited by Paulie

Share this post


Link to post
Share on other sites
PiroX

is there a way to detect the second monitor and get the desktop size?

edit: http://www.autoitscript.com/forum/index.php?showtopic=82353&st=0&p=590685&#entry590685

Edited by PiroX

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.