Moving around windows which are part of other apps

Hello,
I need to write a bit of code which can move around windows which are
not associated to my code. i.e. somehow get a handle to all windows on
the screen, and move them all a few pixels down or move them all to 0,0
on the screen. Just to get me started, should I be looking at ‘regions’
or is that too low level? Just point me at a function to get me started :wink:

Cheers

Garry

Hello Garry

What you can try is to use PhQueryRids with the type set to
Ph_WINDOW_REGION. This should get you all of the window region id’s.
Run through each of the region id’s that you get back and use the
function PtFowardWindowEvent to send each of them a message to move.

Thanks,
Rodney

Garry wrote:

Hello,
I need to write a bit of code which can move around windows which
are not associated to my code. i.e. somehow get a handle to all windows
on the screen, and move them all a few pixels down or move them all to
0,0 on the screen. Just to get me started, should I be looking at
‘regions’ or is that too low level? Just point me at a function to get
me started > :wink:

Cheers

Garry

Rodney Dowdall wrote:

Hello Garry

What you can try is to use PhQueryRids with the type set to
Ph_WINDOW_REGION. This should get you all of the window region id’s.
Run through each of the region id’s that you get back and use the
function PtFowardWindowEvent to send each of them a message to move.

Thanks,
Rodney

Cheers Rodney, this looks like exactly what I need.

Thanks

Garry