Jump to content

$WS_EX_NOACTIVATE


Go to solution Solved by pixelsearch,

Recommended Posts

Posted

If I create a GUI with $WS_EX_NOACTIVATE and i minimize the GUI a window appears above the taskbar.
Is there any way to prevent this?

 

Screenshot_24.png.ffb1931c738b13539a0f0c394ca946b3.png

 

 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 400, 400, -1, -1, -1, $WS_EX_NOACTIVATE)
    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
EndFunc   ;==>Example

 

Posted (edited)

I don't notice this behavior to me,  with Windows 10, the only thing that is visible is the tray Icon.

 

Edit:
To be precise, I don't see any folding windows as shown in your photo.

Edited by ioa747

I know that I know nothing

Posted

@bladem2003  I can reproduce the behavior that you explained.  I believe it is a feature of Windows (I also have Win10).  Since you loose the ability to restore the windows, I think Windows decided to add this feature.  If you have a maximized window, you do not see the window bar over the task bar.  Maybe this is why @ioa747 is not seeing it...

  • Solution
Posted
6 hours ago, bladem2003 said:

If I create a GUI with $WS_EX_NOACTIVATE and i minimize the GUI a window appears above the taskbar.
Is there any way to prevent this?

On my computer too, I can reproduce the behavior you described ("a window appears above the taskbar on the left side")

According to msdn, if you use $WS_EX_NOACTIVATE and want your window to appear on the TaskBar, then you need to add the ExStyle $WS_EX_APPWINDOW

BitOr($WS_EX_NOACTIVATE, $WS_EX_APPWINDOW)

I tested it and it works. When the GUI is restored from the TaskBar and another window partially covers it, then clicking on your GUI doesn't bring it to the foreground (which is the purpose of $WS_EX_NOACTIVATE)

Hope it helps

Posted
17 minutes ago, pixelsearch said:

On my computer too, I can reproduce the behavior you described ("a window appears above the taskbar on the left side")

According to msdn, if you use $WS_EX_NOACTIVATE and want your window to appear on the TaskBar, then you need to add the ExStyle $WS_EX_APPWINDOW

BitOr($WS_EX_NOACTIVATE, $WS_EX_APPWINDOW)

I tested it and it works. When the GUI is restored from the TaskBar and another window partially covers it, then clicking on your GUI doesn't bring it to the foreground (which is the purpose of $WS_EX_NOACTIVATE)

Hope it helps

@pixelsearch thanks.

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
  • Recently Browsing   0 members

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