Animation Control question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Animation Control question

Hybrid View

  1. #1
    treeve moss Guest

    Animation Control question


    I'm using an animation control to show progress whilst deleting data from
    a database.

    If there is an error I want to show a message and pause the animation until
    the message has been responded to. Using the stop and start properties on
    the animation control causes the animation to restart at the start of the
    avi clip. Does anyone know a way of restarting the clip where it was stopped?

    treeve

  2. #2
    Klaus H. Probst Guest

    Re: Animation Control question


    "treeve",

    I'm not sure if the control responds to APIs, but you can try this:

    Private Const WM_USER = &H400
    '// Standard messages
    Public Const ACM_OPEN = (WM_USER + 100)
    Public Const ACM_PLAY = (WM_USER + 101)
    Public Const ACM_STOP = (WM_USER + 102)

    Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd
    As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

    The ACM_PLAY message accepts a range of frames to play in lParam (as a
    packed DWORD). There's no way that I'm aware of through which you can
    determine the frame at the time the clip stops, but you can probably
    approximate. It's probably pretty complicated to do, since not even Windows
    stops its clips on a message box or an error.

    Call SendMessage(Control.hWnd, ACM_PLAY, Repetitions, ByVal (FromFrame Or
    (ToFrame * &H10000)))

    If you pass the FromFrame as the point you want it to start, -1 as the
    ToFrame (to have the control go to the end of the clip) and -1 as the
    repetitions it should work, at least theoretically :-) I didn't try it,
    though.


    --
    .. . . . . . . . . . . . . . . . . . . . . .
    Klaus H. Probst, MVP
    http://www.vbbox.com/
    http://www.mvps.org/ccrp/

    Please post/reply to the newsgroup(s)


    "treeve moss" <treevem@hotmail.com> wrote in message
    news:3911435e$1@news.devx.com...
    >
    > I'm using an animation control to show progress whilst deleting data from
    > a database.
    >
    > If there is an error I want to show a message and pause the animation

    until
    > the message has been responded to. Using the stop and start properties on
    > the animation control causes the animation to restart at the start of the
    > avi clip. Does anyone know a way of restarting the clip where it was

    stopped?
    >
    > treeve




  3. #3
    Klaus H. Probst Guest

    Re: Animation Control question


    "treeve",

    I'm not sure if the control responds to APIs, but you can try this:

    Private Const WM_USER = &H400
    '// Standard messages
    Public Const ACM_OPEN = (WM_USER + 100)
    Public Const ACM_PLAY = (WM_USER + 101)
    Public Const ACM_STOP = (WM_USER + 102)

    Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd
    As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

    The ACM_PLAY message accepts a range of frames to play in lParam (as a
    packed DWORD). There's no way that I'm aware of through which you can
    determine the frame at the time the clip stops, but you can probably
    approximate. It's probably pretty complicated to do, since not even Windows
    stops its clips on a message box or an error.

    Call SendMessage(Control.hWnd, ACM_PLAY, Repetitions, ByVal (FromFrame Or
    (ToFrame * &H10000)))

    If you pass the FromFrame as the point you want it to start, -1 as the
    ToFrame (to have the control go to the end of the clip) and -1 as the
    repetitions it should work, at least theoretically :-) I didn't try it,
    though.


    --
    .. . . . . . . . . . . . . . . . . . . . . .
    Klaus H. Probst, MVP
    http://www.vbbox.com/
    http://www.mvps.org/ccrp/

    Please post/reply to the newsgroup(s)


    "treeve moss" <treevem@hotmail.com> wrote in message
    news:3911435e$1@news.devx.com...
    >
    > I'm using an animation control to show progress whilst deleting data from
    > a database.
    >
    > If there is an error I want to show a message and pause the animation

    until
    > the message has been responded to. Using the stop and start properties on
    > the animation control causes the animation to restart at the start of the
    > avi clip. Does anyone know a way of restarting the clip where it was

    stopped?
    >
    > treeve




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center