Jump to content

Recommended Posts

Posted

Hi!

I have a gui which is created with parameter $WS_EX_TOPMOST.

There is a button which calls the FileOpenDialog. If this window is displayed the GUI should temporary set to background until the dialog is closed. How to realize that?

Thx in advance.

Regards,

Buffo

Posted

This will not work. I searched the forum before but it seems that no one knows how to do it.

Opt("GuiOnEventMode", 1)
...
GuiCreate("bla bla bla", ... ,..., ...$WS_EX_TOPMOST)
$btn = GuiCtrlCreateButton("Click", ...)
GuiCtrlSetOnEvent($btn, "Click")
...

Func Click()
$var = FileOpenDialog(....)
...
EndFunc

It is not possible to set the FileopenFolder dialog with WinSetOnTop() because the script is paused there till the dialog ist closed.

Isn't there a possibility to change the window states after creating the window? I can't believe. ALL is possible with AutoIt3. Such a simple thing cannot be the limit :whistle:

Come on guys ;)

Regards,

Buffo

Posted

Ahem... I just showed you the answer. I will reiterate with your own code:

Opt("GuiOnEventMode", 1)
...
$guihandle = GuiCreate("bla bla bla", ... ,..., ...$WS_EX_TOPMOST)
$btn = GuiCtrlCreateButton("Click", ...)
GuiCtrlSetOnEvent($btn, "Click")
...

Func Click()
WinSetOnTop($guihandle, "", 0)
$var = FileOpenDialog(....)
WinSetOnTop($guihandle, "", 1)
...
EndFunc

Now that wasn't hard, was it?

Who else would I be?
Posted

@this-is-me: In the manual I totally read over the third "flag" parameter. With WinSetOnTop() I associated only the "on top" feature not the opposite. Sorry for such a stupid question and thanks for your support :whistle:

@Mod: Please delete ;)

Regards,

Buffo

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