orbs Posted March 4, 2015 Share Posted March 4, 2015 whenever i call this on my GUI: GUISetState(@SW_HIDE) the GUI does indeed become hidden, but it does so with a visual effect used for the Minimize command - i.e. decreasing size while fading. the effect is very swift, but still i'd like to cancel this effect and make the GUI immediately hidden. any hints? TheDcoder 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted March 4, 2015 Share Posted March 4, 2015 GUISetState(@SW_DISABLE, -1) EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
orbs Posted March 4, 2015 Author Share Posted March 4, 2015 GUISetState(@SW_DISABLE, -1) nope. it doesn't work in practice, and no reason it should work in theory either. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted March 4, 2015 Share Posted March 4, 2015 Func _WinHide($hWin, $toggled = False) If $toggled = False Then GUISetState(@SW_DISABLE, $hWin) GUISetState(@SW_HIDE, $hWin) Else GUISetState(@SW_ENABLE, $hWin) GUISetState(@SW_SHOW, $hWin) EndIf EndFunc ; TheDcoder ;) EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
orbs Posted March 4, 2015 Author Share Posted March 4, 2015 tried that. disabling before hiding makes no difference. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted March 4, 2015 Share Posted March 4, 2015 tried that. disabling before hiding makes no difference. Strange.... Works for me EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
TheSaint Posted March 4, 2015 Share Posted March 4, 2015 I can't say I've ever noticed this issue. Perhaps it is a Windows setting on your PC? I seem to recall you can have that occur. I don't have that enabled on mine. TheDcoder 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
orbs Posted March 4, 2015 Author Share Posted March 4, 2015 Strange.... Works for me if you omit the disable/enable, do you see the effect that you claim not to see when the disable/enable in place? Perhaps it is a Windows setting on your PC? it is, it's part of the Aero effects. the point is - i don't want it disabled, not in general and not for this application. i simply want this specific GUI of my script to just hide itself when i ask it to. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted March 4, 2015 Share Posted March 4, 2015 if you omit the disable/enable, do you see the effect that you claim not to see when the disable/enable in place? no EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
orbs Posted March 4, 2015 Author Share Posted March 4, 2015 no so if either way you do not see the effect, it means disable/enable does not make any difference. b.t.w it is set here:: System Properties > Advanced > Performance > Settings... Visual Effects > "Animate windows when minimizing and maximizing" Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheSaint Posted March 5, 2015 Share Posted March 5, 2015 System Properties > Advanced > Performance > Settings... Visual Effects > "Animate windows when minimizing and maximizing" So if you change that setting, do you still get your issue? If no, then you need to look at something that will either temporarily unset that setting, or you need to do research outside of AutoIt I expect, for it would be a Windows issue, not an AutoIt one. That's not to say that some DLL call etc might not do the trick. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
mpower Posted March 5, 2015 Share Posted March 5, 2015 (edited) Try this: Func EnableWindowAnimation($value = True) Local Const $SPI_SETANIMATION = 0x0049 Local Const $SPI_GETANIMATION = 0x0048 Local Const $tagANIMATIONINFO = "uint cbSize;int iMinAnimate" Local $struct = DllStructCreate($tagANIMATIONINFO) DllStructSetData($struct, "iMinAnimate", $value) DllStructSetData($struct, "cbSize", DllStructGetSize($struct)) $aReturn = DllCall('user32.dll', 'int', 'SystemParametersInfo', 'uint', $SPI_SETANIMATION, 'int', DllStructGetSize($struct), _ 'ptr', DllStructGetPtr($struct), 'uint', 0) EndFunc ;==>_wndMinAnimation Call that function with a False argument and then do the GUISetState(@SW_HIDE) . Just dont forget to enable the animation back by calling the Function with the True argument. Best bet is to put it on gui close event: Case $GUI_EVENT_CLOSE EnableWindowAnimation(True) Though to be honest I've never experienced this issue might be some funky windows settings on your machine.... Edited March 5, 2015 by mpower Link to comment Share on other sites More sharing options...
Solution Yashied Posted March 5, 2015 Solution Share Posted March 5, 2015 $hForm = GUICreate('MyGUI', 400, 400) GUISetState() While 1 Switch GUIGetMsg() Case -3 WinSetTrans($hForm, '', 0) GUISetState(@SW_HIDE) ExitLoop EndSwitch WEnd Sleep(1000) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
orbs Posted March 5, 2015 Author Share Posted March 5, 2015 WinSetTrans($hForm, '', 0) someday i'll make it to the level i'll feel ashamed for not thinking about it myself... a simple and elegant workaround! thanks Yashid! TheSaint 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff 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