1. Moving windows in Windows
- Posted by SnakeCharmer Jan 13, 2013
- 1472 views
I need tiny utility for moving all windows of running applications to left upper corner of screen. How to do it? I need working code, please. Thanks in advance.
2. Re: Moving windows in Windows
- Posted by andi49 Jan 13, 2013
- 1440 views
I need tiny utility for moving all windows of running applications to left upper corner of screen. How to do it? I need working code, please. Thanks in advance.
include tinewg.exw include std/math.e sequence rect sequence app_handles={} sequence window_handles= EnumWindows () for i=1 to length (window_handles) do if and_bits ( GetWindowLong (window_handles[i],GWL_STYLE), or_all ({WS_VISIBLE,not(WS_POPUP)})) then --ingnore POPUPS and Invisible Windows if not(equal( GetText (window_handles[i]),{})) then --ingnore Windows without a Caption app_handles= append (app_handles,window_handles[i]) end if end if end for for i=1 to length(app_handles) do rect=GetWindowRect(app_handles[i]) MoveWindow(app_handles[i],0,0,rect[3]-rect[1],rect[4]-rect[2],True) end for
The Library i use (tinewg) is here http://euphoria.indonesianet.de/source.zip
I think this is enough, to see how it works, so you can write the Code for the Win32 Wrapper you use.
Andreas
3. Re: Moving windows in Windows
- Posted by SnakeCharmer Jan 13, 2013
- 1325 views
Thanks. I tried to solve a problem independently and found example in Archive - Window Finding Functions (wrapper for win32 functions, 2Kb).
I wrote already a little, but your way is simpler. The invention of bicycles is a heavy sin for any programmer. :) Thanks for your work.