Jump to content

disable animation when maximize/minimize a window


Recommended Posts

hello,

is there a way to disable the animation when you click 'TestGui' in the taskbar to minimize or maximize the window?

#include <GUIConstants.au3>

$gui = GUICreate("TestGui", 100, 100, @DesktopWidth/2, @DesktopHeight/2, -1, -1)
    GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
Link to comment
Share on other sites

Hi,

you can set the window trans before min or maximize.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

What animation? in the example that you provide there no animation...

Can you be more specific?

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

it is the window animation when maximizing/minimizing. i found out that it there is a key in the registry

HKEY_CURRENT_USER\Control Panel\desktop\WindowMetrics

key "MinAnimate" - set it to 0 (off) or 1 (on):

maybe it is set off at your computer. it shows a short animation when maximizing from the taskbar to the window, or the other way round when minimizing... hard to explain in english.. saw this animation not only at my computer...

Link to comment
Share on other sites

Try to write to the registry on minimize event (see RegWrite() function in help file).

Somthing like this:

If GuiGetMsg() = $GUI_EVENT_MINIMIZE Then RegWrite("HKEY_CURRENT_USER\Control Panel\desktop\WindowMetrics", "MinAnimate", "REG_SZ", 0)

Not sure if this will work, maby you need write it to registry when script is start, and also you can try to change the behaviour of some events, to manipulate manualy the minimize process (see Opt("GUIEventOptions", 1).

hard to explain in english

You can explain on russian, i will understand :shocked: Edited by MsCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 4 years later...

You should use SystemParametersInfo to change windows minimize/maximize animation. If you make the change to registry it won't update the changes before system restart.

Here is function you can use to disable or enable the animation.

_wndMinAnimation(False)

#region - _wndMinAnimation
;===============================================================================
;
; Description:  : Toggles wndMinAnimation on or off.
; Parameter(s):  : $value - True or False
; Requirement:  : -
; Return Value(s): : -
; User CallTip:  :
; Author(s):  : Eemuli
; Note(s):   : http://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx
;
;===============================================================================

Func _wndMinAnimation($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))[/indent]

$aReturn = DllCall('user32.dll', 'int', 'SystemParametersInfo', 'uint', $SPI_SETANIMATION, 'int', DllStructGetSize($struct), _
   'ptr', DllStructGetPtr($struct), 'uint', 0)[/indent]

EndFunc   ;==&gt;_wndMinAnimation

#endregion - _wndMinAnimation
Edited by Eemuli
Link to comment
Share on other sites

  • Moderators

Eemuli,

Once you get above a certain number of posts (I can never remember if it is 5 or 10 and I am too busy to go and look on the server to find out) you will find an "Edit" button appearing at bottom right of the post which will allow you to amend your previous posts. And if you edit the first post of a topic and select the "Use Full Editor" option, you can also amend the thread title. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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