Re: Moving windows in Windows

new topic     » goto parent     » topic index » view thread      » older message » newer message
SnakeCharmer said...

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu