Sign in to follow this  
Followers 0
alexpere

How to set a window (not dialog) always on top?

3 posts in this topic

I'm currently using the command:

GUICreate($progName, 350, 400, -1, -1, BitOr($WS_CAPTION, $WS_POPUP))

to create a very simple GUI window with no close buttons, etc. I want this window to always stay on top. I've tried the switches $DS_MODALFRAME (which I guess won't work because it's not a dialog) and $WS_EX_TOPMOST to no avail.

Has anyone else done this with success that can help me out?

Share this post


Link to post
Share on other sites



This should stay on top (unless other windows also have the "topmost" property):

#include <GuiConstants.au3>

GUICreate("Example", 350, 400, -1, -1, BitOr($WS_CAPTION, $WS_POPUP), $WS_EX_TOPMOST)
GuiSetState()

While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd
You could also AutoIt's WinSetOnTop function :lmao:

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Thanks CyberSlug, there's so many options these days and I was choosing the complicated one!

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  
Followers 0