KaFu Posted December 12, 2008 Posted December 12, 2008 (edited) HiHo Forum, maybe anyone can answer this easily. I want to create a transparent GUI invisible in the taskbar and also invisible in the ALT+TAB dialogue. Invisible in the taskbar I found via search, just create a child window and don't show the parent window. But this child window still shows up in the ALT-TAB. Does anyone got a solution for this one? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WINAPI.au3> $Form1 = GUICreate("hide", 1, 1, 1, 1) $Form2 = GUICreate("Show", 100, 100, Default, Default, $WS_POPUP, $WS_EX_LAYERED, $Form1) ; will create a dialog box that when displayed is centered GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($Form2, 0xABCDEF, 255) GUICtrlCreateLabel("Test", 10, 10) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() ;=============================================================================== ; ; Function Name: _WinAPI_SetLayeredWindowAttributes ; Description:: Sets Layered Window Attributes:) See MSDN for more informaion ; Parameter(s): ; $hwnd - Handle of GUI to work on ; $i_transcolor - Transparent color ; $Transparency - Set Transparancy of GUI ; $isColorRef - If True, $i_transcolor is a COLORREF( 0x00bbggrr ), else an RGB-Color ; Requirement(s): Layered Windows ; Return Value(s): Success: 1 ; Error: 0 ; @error: 1 to 3 - Error from DllCall ; @error: 4 - Function did not succeed - use ; _WinAPI_GetLastErrorMessage or _WinAPI_GetLastError to get more information ; Author(s): Prog@ndy ; ; Link : @@MsdnLink@@ SetLayeredWindowAttributes ; Example : Yes ;=============================================================================== ; Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False) ; ############################################# ; You are NOT ALLOWED to remove the following lines ; Function Name: _WinAPI_SetLayeredWindowAttributes ; Author(s): Prog@ndy ; ############################################# If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03 If Not $isColorRef Then $i_transcolor = Hex(String($i_transcolor), 6) $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2)) EndIf Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages) Select Case @error Return SetError(@error, 0, 0) Case $Ret[0] = 0 Return SetError(4, _WinAPI_GetLastError(), 0) Case Else Return 1 EndSelect EndFunc ;==>_WinAPI_SetLayeredWindowAttributes Best Regards Edited December 12, 2008 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
ProgAndy Posted December 12, 2008 Posted December 12, 2008 with $WS_EX_TOOLWINDOW -> no hidden window needed to hide taskbarbutton $Form2 = GUICreate("Show", 100, 100, Default, Default, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW,$WS_EX_LAYERED) ); will create a dialog box that when displayed is centered GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($Form2, 0xABCDEF, 255) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
KaFu Posted December 12, 2008 Author Posted December 12, 2008 (edited) Strange, thought I tested that and it didn't work. Must have done something different wrong then. Thanks, works as intended. Doesn't even need to be a child this way. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WINAPI.au3> $Form1 = GUICreate("HiddenApp", 100, 100, Default, Default, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW,$WS_EX_LAYERED) ); will create a dialog box that when displayed is centered GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($Form1, 0xABCDEF, 255) GUICtrlCreateLabel("Test", 10, 10) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() ;=============================================================================== ; ; Function Name: _WinAPI_SetLayeredWindowAttributes ; Description:: Sets Layered Window Attributes:) See MSDN for more informaion ; Parameter(s): ; $hwnd - Handle of GUI to work on ; $i_transcolor - Transparent color ; $Transparency - Set Transparancy of GUI ; $isColorRef - If True, $i_transcolor is a COLORREF( 0x00bbggrr ), else an RGB-Color ; Requirement(s): Layered Windows ; Return Value(s): Success: 1 ; Error: 0 ; @error: 1 to 3 - Error from DllCall ; @error: 4 - Function did not succeed - use ; _WinAPI_GetLastErrorMessage or _WinAPI_GetLastError to get more information ; Author(s): Prog@ndy ; ; Link : @@MsdnLink@@ SetLayeredWindowAttributes ; Example : Yes ;=============================================================================== ; Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False) ; ############################################# ; You are NOT ALLOWED to remove the following lines ; Function Name: _WinAPI_SetLayeredWindowAttributes ; Author(s): Prog@ndy ; ############################################# If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03 If Not $isColorRef Then $i_transcolor = Hex(String($i_transcolor), 6) $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2)) EndIf Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages) Select Case @error Return SetError(@error, 0, 0) Case $Ret[0] = 0 Return SetError(4, _WinAPI_GetLastError(), 0) Case Else Return 1 EndSelect EndFunc ;==>_WinAPI_SetLayeredWindowAttributesoÝ÷ اµéݶ¬zØb²Úæy«rÝéiz¶©¦«¨µº.Ú®¢Ûh¶©®)¯&©¥h¥Ú,£©ÚvX{azf¢ªijwZºÚ"µÍ[È^XYX B ÌÍÜÜ×ÝØ]ÚHÚ[Ù]ÜÊÚ[Ù][J ][ÝÒY[ ][ÝË ][ÝÉ][ÝÊJBYÚ[XÝ]J ÌÍÙÝZWÛXZ[HHYH[ ÌÍÙYרÚ[ÙWÜÙXÛÛØÛÛÙHH[ÕÚ[TWÔÙ]Ú[ÝÔÜÊÚ[Ù][J ][ÝÒY[ ][ÝË ][ÝÉ][ÝÊK ÌÍÒÓÕÔSÔÕ ÌÍÜÜ×ÝØ]ÚÌK ÌÍÜÜ×ÝØ]ÚÌWK ÌÍÜÜ×ÝØ]ÚÌK ÌÍÜÜ×ÝØ]ÚÌ×K ÌÍÔÕÔÓÐPÕUUJBÕÚ[TWÔÙ]Ú[ÝÔÜÊÚ[Ù][J ][ÝÒY[ ][ÝË ][ÝÉ][ÝÊK ÌÍÒÓÓÕÔSÔÕ ÌÍÜÜ×ÝØ]ÚÌK ÌÍÜÜ×ÝØ]ÚÌWK ÌÍÜÜ×ÝØ]ÚÌK ÌÍÜÜ×ÝØ]ÚÌ×K ÌÍÔÕÔÓÐPÕUUJB ÌÍÙYרÚ[ÙWÜÙXÛÛØÛÛÙHHB[ÙRYÚ[XÝ]J ÌÍÙÝZWÛXZ[HH[ÙH[ ÌÍÙYרÚ[ÙWÜÙXÛÛØÛÛÙHHH[ ÌÍÙYרÚ[ÙWÜÙXÛÛØÛÛÙHH[Y[[ÈÏOIÝÛ^XYX This part already worked as intended . If the main app is activated the second app is set ontop. If main app receives @sw_hide or @sw_show so will the helper-app. Best Regards Gruss Edited December 12, 2008 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now