Jump to content

How to put an Input GUI on top of other GUIs?


Burgaud
 Share

Recommended Posts

I have an Input ($FINDER), an Edit ($NOTEPAD) and other GUIs (Listview, Tabs, statusbar)...

GLOBAL $NOTEPAD = GUICtrlCreateEdit("This is a scratchpad where you can write notes or equations.", 0, 0, 500, 200, BitOR($ES_WANTRETURN, 0))
GUICtrlSetFont    (-1, 12, 400, 0, $FONT, 5)
GUICtrlSetColor   (-1, 0x000000)
GUICtrlSetBkColor (-1, 0x80FF80)
GLOBAL $FINDER = GUICtrlCreateInput("",350,10,125,25)
GUICtrlSetFont    (-1, 12, 400, 0, $FONT, 5)
GUICtrlSetBkColor (-1, 0xFFFFFF)
GUICtrlSetState   (-1, $GUI_ONTOP+$GUI_SHOW)

(I also have GUIRegisterMsg($WM_SIZE, "WM_SIZE") that relocate/resize GUIs when there is a resize call.)

I want $FINDER to be on top of $NOTEPAD at all times as suggested by the above codes. The other GUIs do not overlap on any of these two.

However, this $FINDER is only "on top/visible" when I mouse-over onto it. When I focus/click on other GUIs, $FINDER disappears/hidden by $NOTEPAD

How do I force $FINDER to be visible at all times? Is there some GUICtrlSetState or transparency I need to do?

Thanks.

Link to comment
Share on other sites

GUI_ONTOP atribut in this context (GUICtrlSetState) has meaning only for particular control among other controls inside your GUI.

You can set WS_EX_TOPMOST ex style for your main GUI window (GUICreate) to overlap other external applications, but in this case by whole your AutoIt's GUI window (not by particular control).

 

Quote

 

WS_EX_TOPMOST

Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated.

 

 
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...