Jump to content
Sign in to follow this  
AustrianOak

Set a window to bottom most

Recommended Posts

AustrianOak

I've seen programs that have a position setting and they have options such as Normal, On top, On Bottom, and On Desktop.

The last two options especially interested me and I want to know if I can achieve this in autoit?

Share this post


Link to post
Share on other sites
martin

I've seen programs that have a position setting and they have options such as Normal, On top, On Bottom, and On Desktop.

The last two options especially interested me and I want to know if I can achieve this in autoit?

To achieve bottom you can set the parent to Program Manager

#include <guiconstants.au3>
#include <constants.au3>
#include <windowsconstants.au3>

$hGui1 = GUICreate('Just a Way To End SCript', 300,100)
GUISetState()
Run("notepad.exe")
WinWait("Untitled","",10)
$hw1 = WinGetHandle("Untitled")
WinMove("Untitled", "", 0, 0, 400, 300)
Sleep(100)
$origParent = DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle("Untitled"), "hwnd",  WinGetHandle("Program Manager"))

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then
    ;set Notepad back To Original parent
        DllCall("user32.dll", "int", "SetParent", "hwnd", $hw1, "hwnd", $origParent[0])
        Exit
    EndIf
    
WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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  

×