Jump to content

Inputbox to be on top of everything.


vbMark
 Share

Recommended Posts

  • Developers

How do I get the Inputbox to me on top of everything when my main form is set to be on top?

Thanks!

<{POST_SNAPBACK}>

Doesn't have that option, but you could make your own Inpubox with the Gui functions and give the gui the topmost attribute...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Doesn't have that option, but you could make your own Inpubox with the Gui functions and give the gui the topmost attribute...

<{POST_SNAPBACK}>

Ah, cool. Thanks.

How do I get an AutoIt window to stay on top? The code looks like it's only for non-AutoIt windows.

WinSetOnTop ( "title", "text", flag )

Edited by vbMark
Link to comment
Share on other sites

here's an example of making your own inputbox that's modal to the main form.

#include <GuiConstants.au3>

$main = GUICreate("MyGUI", 392, 322)

$Button_1 = GUICtrlCreateButton("Input", 140, 190, 70, 30)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            GUISetState(@SW_DISABLE, $main)
            _Input()
            GUISetState(@SW_ENABLE, $main)
            GUISetState(@SW_SHOW)
        Case Else
       ;;;
    EndSelect
WEnd
Exit

Func _Input()
    $popup = GUICreate("PopUP", 191, 85, -1, -1, $WS_DLGFRAME, $WS_EX_TOPMOST)
    
    $Input_1 = GUICtrlCreateInput("Input1", 0, 0, 180, 20)
    $Button_2 = GUICtrlCreateButton("OK", 60, 40, 60, 20)
    
    GUISetState()
    While 1
        $msg2 = GUIGetMsg()
        Select
            Case $msg2 = $Button_2
                ExitLoop
            Case Else
           ;;;
        EndSelect
    WEnd
    GUIDelete($popup)
EndFunc ;==>_Input

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...