Results 1 to 4 of 4

Thread: VB6 Easing-Functions (a more powerful alternative to AnimateWindow)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    VB6 Easing-Functions (a more powerful alternative to AnimateWindow)

    For those who never heard of Easing-Functions, they are used in all kind of
    animation-scenarios - these days most often for Browser-(js)Widgets and -Effects.

    Here's a link which describes them (with a nice Overview-Chart, which animates its Images on MouseOver):
    http://easings.net/en

    The underlying math is not that difficult - and I've encapsulated the most interesting Easing-Methods in a little Class.

    This Class now also contains an 'Animate'-Method, which you can hand a Control,
    a Property-Name, and PropStart - PropEnd-Values, you want to animate (over a given Duration).

    For that 'Animate'-Method the little cEasing-Class now makes use of an internal cTimer-Class
    (for which I've choosen the first one I was able to find in the CodeBank that supported an Event):
    http://www.vbforums.com/showthread.p...ule-2008-06-15

    Here is what it looks like in action (animating two Control-Properties at once - the Top- and the Alpha-Property):



    Here is the Source-Code: http://vbRichClient.com/Downloads/Easing.zip

    Have fun with it...

    Olaf
    Last edited by Schmidt; May 25th, 2017 at 07:32 AM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: VB6 Easing-Functions (a more powerful alternative to AnimateWindow)

    Haven't tried your code, but I think it is restricted to Win8 and higher, due to setting layered window attribute on a child window, correct?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: VB6 Easing-Functions (a more powerful alternative to AnimateWindow)

    Hi, LaVolpe, I tested the above example on XP, and it worked perfectly.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: VB6 Easing-Functions (a more powerful alternative to AnimateWindow)

    Quote Originally Posted by LaVolpe View Post
    Haven't tried your code, but I think it is restricted to Win8 and higher, due to setting layered window attribute on a child window, correct?
    Yep, that's what I wrote already in the thread which triggered this contribution:
    http://www.vbforums.com/showthread.p...=1#post5172513

    @dreammanor
    It works on XP, but the Alpha-changes (which happen in parallel to the Movements) are not having any effect.

    Olaf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width