Jump to content

Recommended Posts

Posted (edited)

I couldn't find an answer to this in the help file or forums.

I see how to set a MsgBox with the top-most attribute...

MsgBox(262144, "Test", "This box will time out in 10 seconds", 10)

But how can I do this with an InputBox function?

Edited by SteveH
Posted

Thank you for the thread reference sandin. That does indeed work. I gather that if I #include the _InputBox.au3 in my script, then I can call the _InputBox function when needed. The _Inputbox also gives alot of other handy parameter options.

I had wondered if I had to create a GUI version of the inputbox (but had hoped to avoid that).

Earlier tonight I was looking at the GUISetStyle function and the $WS_EX_TOPMOST extended style but I couldn't get it to work. I tried putting the $WS_EX_TOPMOST extended style into the 'AutoIT Help' example on the GUISetStyle page:

#include <GuiConstants.au3>
$NewStyle = False
$hWnd = GUICreate("Gui Style", 260, 100)
$Style = GUICtrlCreateButton("Set Style", 45, 50, 150, 20)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Style
            If Not $NewStyle Then
                GuiSetStyle ($WS_POPUPWINDOW + $WS_THICKFRAME, $WS_EX_CLIENTEDGE + $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
                GUICtrlSetData($Style, 'Undo Style')
                $NewStyle = True
            Else
                GuiSetStyle ($WS_MINIMIZEBOX + $WS_CAPTION + $WS_POPUP + $WS_SYSMENU, 0)
                GUICtrlSetData($Style, 'Set Style')
                $NewStyle = False
            EndIf
        Case Else
    EndSwitch
WEnd

Didn't work... I'm not sure why.

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
×
×
  • Create New...