Link to home
Start Free TrialLog in
Avatar of Octalys
Octalys

asked on

How to move an application to a specific position on the screen (cords) ?

I am an existing application. And now I am making another app.
One of the thing it needs to do is move the existing application to the top left of the screen.

So I need some sort of a function that does this;

Find application window (via window title?), move it to a cord. or just top left of the screen and focus the application.

Thanks in advance!
SOLUTION
Avatar of jmwheeler
jmwheeler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Octalys
Octalys

ASKER

thanks, this code is nice but isnt right for me, because the application has several forms. So it still needs to find out which form(window) to load as this exe has a couple.
If that window has a fixed caption then use the FindWindow() API as jmwheeler has suggested.  Then you can go thru the same procedure I have shown with the resulting hWnd to make it restore and position at the top left.
Avatar of Octalys

ASKER

yeah I figured it out that way too, thanks both!