1. Bring window to front (solution)

Hi,
I asked about this a little while ago and I seem to remember someone
else asking as well... Anyway, here's how to bring a window to the
front that works in later versions of windows (window is the win32lib
window id):

sequence rect
rect = getRect(window)
if
w32Func(xSetWindowPos,{getHandle(window),HWND_TOPMOST,rect[1],rect[2],rect[3]-rect[1],rect[4]-rect[2],0})
then end if
if
w32Func(xSetWindowPos,{getHandle(window),HWND_NOTOPMOST,rect[1],rect[2],rect[3]-rect[1],rect[4]-rect[2],0})
then end if
        
Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.rat-software.com/
Please leave quoted text in place when replying

new topic     » topic index » view message » categorize

2. Re: Bring window to front (solution)

Hi Thomas,
    I don't know if you used Edit (By Mike), but well, there I found a
solution to bring to front the editor's window when opening a new file,
 it uses dde library, but I could also use my SMTA (Send messages
trough apps) to achieve this. On Window's docs, it says that the window
in front is the only one that can bring a window to front by using
SetForegroundWindow, so I start another instance of the editor, check
if it's the second one, and then I communicate the apps so the
background instance send's to the other it's handle and the one that
was started last uses SetForegroundWindow.
Just another solution to this problem.

Best Regards,
   Guillermo BonvehĂ­
   AKA: Caballero Rojo - Knixeur

--- "Thomas Parslow (PatRat)" <patrat at rat-software.com> wrote:
> 
> 
> Hi,
> I asked about this a little while ago and I seem to remember someone
> else asking as well... Anyway, here's how to bring a window to the
> front that works in later versions of windows (window is the win32lib
> window id):
> 
> sequence rect
> rect = getRect(window)
> if
>
w32Func(xSetWindowPos,{getHandle(window),HWND_TOPMOST,rect[1],rect[2],rect[3]-rect[1],rect[4]-rect[2],0})
> then end if
> if
>
w32Func(xSetWindowPos,{getHandle(window),HWND_NOTOPMOST,rect[1],rect[2],rect[3]-rect[1],rect[4]-rect[2],0})
> then end if
>         
> Thomas Parslow (PatRat) ICQ #:26359483
> Rat Software
> http://www.rat-software.com/
> Please leave quoted text in place when replying
> 
> 
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu