spudw2k Posted April 9, 2015 Share Posted April 9, 2015 I found a strange behavior that I wanted to share. The script below demonstrates the issue. I set $GUI_EVENT_CLOSE to hide the GUI instead of closing it. After hiding for 3 seconds it will restore. Notice the Menubar is slightly dimmed. I noticed if you activate another open window and re-activate the script GUI it restores the menubar to the normal darker color. #include <GUIConstantsEx.au3> #include <GuiMenu.au3> Opt("GUIOnEventMode", 1) Local $hGUI = GUICreate("Test GUI w/ Menu", 300, 200) Local $idMenu = GUICtrlCreateMenu("Menu") Local $idMenuItem = GUICtrlCreateMenuItem("Menu Item", $idMenu) GUISetOnEvent($GUI_EVENT_CLOSE, "_Hide") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _Hide() GUISetState(@SW_HIDE, $hGUI) ToolTip("Hiding for 3 seconds") sleep(3000) ToolTip("") WinActivate($hGUI) DllCall("User32.dll", "long", "AnimateWindow", "hwnd", $hGUI, "long", 300, "long", 0x00080000) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") Return 0 EndFunc Func _Exit() Exit EndFunc Anyone seen this before? Any ideas for a good workaround without playing winactivate hockey? I tried _GUICtrlMenu_DrawMenuBar but it didn't have any effect. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Zobengrauzis Posted April 10, 2015 Share Posted April 10, 2015 have you tried _WinAPI_RedrawWindow ? Link to comment Share on other sites More sharing options...
UEZ Posted April 10, 2015 Share Posted April 10, 2015 On Win 8.1 the behaviour is "normal", no dimming effect at least for me. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
spudw2k Posted April 13, 2015 Author Share Posted April 13, 2015 have you tried _WinAPI_RedrawWindow ? Just tried it, it didn't seem to help. I could be calling it wrong, but the func is returning 1. On Win 8.1 the behaviour is "normal", no dimming effect at least for me. Ah yes, OS flavor. I should've mentioned. I'm on Win 7 x64. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
spudw2k Posted April 14, 2015 Author Share Posted April 14, 2015 Found a cheap workaround. #include <GUIConstantsEx.au3> #include <GuiMenu.au3> Opt("GUIOnEventMode", 1) Local $hGUI = GUICreate("Test GUI w/ Menu", 300, 200) Local $idMenu = GUICtrlCreateMenu("Menu") Local $idMenuItem = GUICtrlCreateMenuItem("Menu Item", $idMenu) GUISetOnEvent($GUI_EVENT_CLOSE, "_Hide") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func _Hide() GUISetState(@SW_HIDE, $hGUI) ToolTip("Hiding for 3 seconds") sleep(3000) ToolTip("") WinSetOnTop($hGUI, "", 1) DllCall("User32.dll", "long", "AnimateWindow", "hwnd", $hGUI, "long", 300, "long", 0x00080000) WinActivate($hGUI, "") WinSetOnTop($hGUI, "", 0) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") Return 0 EndFunc Func _Exit() Exit EndFunc Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
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