Jump to content

An animation that looks like the slide one...


AoRaToS
 Share

Recommended Posts

Instead of the slide effect we all know, I found this effect which looks quite nice, I've only found it to work while making the GUI appear, not able to make it work with the effects that hide the GUI...

I haven't tried it with a GUI that contain all the types of controls, buttons and tabs are visible while "in effect", checkboxes and comboboxes appear after it ends.

Try it out with other controls to see how it reacts...

I was curious why this uses the word "long" and tried "short" and found it...

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1500, "short", 0x00040002)

In the first example I use this animation which as you will see starts like the normal slide, but instead of sliding the left side of the GUI in from nowhere, it starts creating the right side of the GUI from the right...

Try this example:

$hwnd = GUICreate("Test Animated Window",500,150)
GUICtrlCreateButton("TEST",230,100,80,25)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2500, "short", 0x00040002)
GUISetState()
ExitoÝ÷ Ø    ݱç­çb}÷«zwr©j·¶aÆ®¶­sbb33c¶væBÒuT7&VFRgV÷CµFW7BæÖFVBvæF÷rgV÷C²ÃSÃS¤uT7G&Ä7&VFT'WGFöâgV÷CµDU5BgV÷C²Ã#3ÃÃÃ#R¤FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c¶væBÂgV÷C¶çBgV÷C²Â#SÂgV÷C¶ÆöærgV÷C²ÂC"¤uT6WE7FFR¤W

s!mpL3 LAN Messenger

Current version 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

Link to comment
Share on other sites

found the rest of the values (I think they should be included in WindowsConstants.au3 or somewhere)

AW_HIDE      := 0x10000
AW_ACTIVATE      := 0x20000
AW_CENTER        := 0x10
AW_BLEND         := 0x80000
AW_SLIDE         := 0x40000
   AW_HOR_POSITIVE   := 0x1
   AW_HOR_NEGATIVE   := 0x2
   AW_VER_POSITIVE   := 0x4
   AW_VER_NEGATIVE   := 0x8

EDIT: ...how do I fade out a window? I didn't find a constant for that

Edited by madflame991
Link to comment
Share on other sites

  • Moderators

Hi all,

These effects are all listed, with example usage, in Gary Frost's WinAnimate UDF - which you can find here.

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

  • Moderators

AoRaToS,

I did read your post and understood instantly why you are "not able to make it work with the effects that hide the GUI". It is because the "lost" part of the constant determines the "show/hide" style of the GUI; as you lose the capability to make them appear and disappear you can only use the "short" version on already visible windows .

Examples:

$AW_SLIDE_IN_LEFT = 0x00040001 = 0x0004000 + 0x0001 = Show + move to left

$AW_SLIDE_OUT_LEFT = 0x00050002 = 0x00050000 + 0x0002 = Hide + move to right (I know "SLIDE_OUT_LEFT" and "move to right" sounds wrong, but it is logical if you think about it!)

$AW_SLIDE_IN_RIGHT = 0x00040002 = 0x00040000 +0x0002 = Show + move to right

$AW_SLIDE_OUT_RIGHT = 0x00050001 = 0x00050000 + 0x0001 = Hide + move to left (same here but in reverse!)

As I said: with "short" you are losing the first part which decides "show/hide" for the GUI.

Please do not think I am criticising you in any way - I am just pointing out that there is a good reason for using the "long" version, which is already well-known and documented.

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...