Jump to content
Sign in to follow this  
jimmyjmmy

how do I move the window to a certain position

Recommended Posts

jimmyjmmy

Hi,

I want to drag the window to a certain position such as top right, what method should I do.

I can think of a function that can do the above, MouseClickDrag , but I worry that for whatever the reason, if the window changed position then my mouse may start the drag at the wrong position.

Thanks

Share this post


Link to post
Share on other sites
jimmyjmmy

WinMove() will do it. :shocked:

Thanks MHz,

Assuming I want to move the active window to the top right hand corner, to know the exact x and y position, I need to move my pointer to get the x and y corordinates. The y coordinate will always be zero but the x coordinate varies and it depends on the width of the active window.

Are there any other methods which will allow me to put, very accurately, the active window to the top right hand corner of the screen, without me having to input the x and y coordinates.

Again I noted that the x coordinate is referring to the top left corner of the active window. Are there any command for me to allign the top right corner of the active window to the top right corner of the screen?

Thanks

Share this post


Link to post
Share on other sites
jimmyjmmy

ok, regarding my above post, this is what I got to put the active window at the top right hand corner of desktop.

$desktopSize = WinGetClientSize ( "Program Manager")

WinMove("GOTCHA!","",$desktopSize[0] - 389,0,389,410)

Share this post


Link to post
Share on other sites
jimmyjmmy

...............WinMove("classname=SciCalc", "", @DesktopWidth - $pos[3], 0)[/

Good idea! Thanks

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.