Sign in to follow this  
Followers 0
kjason

There is WinsetOntop but no Winsetunderbottom?

4 posts in this topic

Greetings~

Is there any way to set a window or GUI placed under all other windows, even when the window is activated?

Any function or any comments are appreciated.

Thanks for your time.

Share this post


Link to post
Share on other sites



Greetings~

Is there any way to set a window or GUI placed under all other windows, even when the window is activated?

Any function or any comments are appreciated.

Thanks for your time.

http://msdn.microsoft.com/library/default....etwindowpos.asp

Use the HWND_BOTTOM


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Thanks so much SmOke_N~~

It looks very promising. I will look into it.

^&^

Welcome... Can't seem to lock it though ... might use a call back to make sure it's not a foreground window.... The code I wrote was:
Func _WinSetBottom($hWnd, $nLock = 1)
    If IsString($hWnd) Then $hWnd = WinGetHandle($hWnd)
    DllCall("USER32.DLL", "int", "SetWindowPos", "hwnd", $hWnd, "long", 1, _
        "int", 0, "int", 0, "int", 0, "int", 0, "int", BitOR(0x02, 0x010, 0x01))
    If @error Then Return SetError(1, 0, 0)
    If $nLock = 0 Then $nLock = 2
    If $nLock <> 2 Then $nLock = 1
    Local $aLSFW = DllCall("USER32.DLL", "int", "LockSetForegroundWindow", "int", $nLock)
    If @error Then Return SetError(2, 0, 0)
    Return $aLSFW[0]
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0