Jump to content
Sign in to follow this  

Dynamic Windows Size Creation Using New Feature

Recommended Posts


This uses the, recently added, ability of AutoIt's to read specific elements of an array, directly from the function return...


$StartMenu_Height = WinGetPos("[CLASS:Shell_TrayWnd]")[3]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


Func Main()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("PANIC", 110, 55,@DesktopWidth-110,@DesktopHeight-WinGetPos("[CLASS:Shell_TrayWnd]")[3]-55,$WS_POPUP)
    $hPANIC_Label = GUICtrlCreateLabel("PANIC", 11, -2, 90, 38)
    GUICtrlSetFont($hPANIC_Label, 28, 800, 0, "Roman")
    $hEnabled_Label = GUICtrlCreateLabel("enabled", 18, 32, 74, 22)
    GUICtrlSetFont($hEnabled_Label, 12, 400, 0, "Courier New")

    ; Set GUI to AlwaysOnTop
    WinSetOnTop($hGUI, "", 1)

    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE


    ; Delete the previous GUI and all controls.
EndFunc   ;==>Example

I'm not sure what that feature is called, exactly, but it very handy. ^.^

Edited by BinaryBrother
  • Like 2

Share this post

Link to post
Share on other sites

Always was on my wish list... thanks for info,

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.