Sign in to follow this  
Followers 0
lyledg

Always on Top attribute question

6 posts in this topic

#1 ·  Posted (edited)

Guys

I am trying to open a "Filopendialog" with the "always on top attribute set" so that it opens above all others, and after reading through these forums found Valik's piece of code to work quite well, except for when using it in the following manner:

GUICreate(" Appname", 700,680, @DesktopWidth/2-340, @DesktopHeight/2-380,-1, 0x00000218); WS_EX_ACCEPTFILES, $WS_EX_TOPMOST, $WS_EX_CLIENTEDGE


Func FileODialog ()
Opt("WinWaitDelay", 1)
WinActivate(AutoItWinGetTitle())
WinSetState(AutoItWinGetTitle(), "", @SW_HIDE)
$file = FileOpenDialog("Choose file...", @ScriptDir & "\Jobs","All (*.cmd)")

EndFunc

Etc..

Problem I am having is because the GUICreate is set to 0x00000218 (WS_EX_ACCEPTFILES, $WS_EX_TOPMOST, $WS_EX_CLIENTEDGE), any window I open after the GUI is created, will always appear behind it. How do I overcome this?

Using WinSetState does not seem to work for me.

Also, I am trying to do the same for a *.CHM (help file) to have the same attribute when launched, but having the same result..

PS: The GUICreate HAS to have the $WS_EX_TOPMOST set, As the user needs to drag and drop files to this window

Any Ideas?

Cheers

Edited by lyledg

Share this post


Link to post
Share on other sites



Thanks Cyberslug, I forgot to mention that WinSetOnTop($title, "", 1) does not work either :idiot:

Share this post


Link to post
Share on other sites

Do any guru's out there see what I am doing wrong here, please?

Cheers :idiot:

Share this post


Link to post
Share on other sites

Uh..Thanks Larry..I think? ;)

How do I go about getting around this problem then? I need to have the initial GUI set with the Topmost attribute, (the user needs to drag and drop files to it) and any other windows that are opened subsequently need to be on top of the 1st GUI?

Sorry to be pain in asking so many questions... :idiot:

:D:lol:

Share this post


Link to post
Share on other sites

Set the window NOT on top before calling the dialog, msgbox or other, and then set it BACK on top afterwards.


Who else would I be?

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