CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    Animation Control

    If I wanted to have a .avi animation on my form, what control should I use?
    Microsoft Direct Animation Media Control. There are four icons in the tool box for this one.

    or

    Microsoft Multimedia Control 6.0

    or something else.


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Animation Control

    Private Sub Form_Load()
    With CommonDialog1 'Microsoft Common Dialog Control
    .Filter = "avi (*.avi) | *.avi"
    .ShowOpen
    End With
    With Animation1 'Microsoft Windows Common Controls -2
    .AutoPlay = True
    .Open CommonDialog1.FileName
    End With

    End Sub


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Animation Control

    I found another one without ocx

    Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, _
    ByVal lpstrReturnString As String, ByVal ReturnLength As Long, ByVal hwndCallback As Long) As Long


    Private Sub Form_Click()
    Dim Ret As Long, A$, x As Integer, y As Integer
    x = 0
    y = 0
    A$ = "C:\Windows\Movie.avi" 'Change the path and filename
    Ret = mciSendString("stop movie", 0&, 128, 0)
    Ret = mciSendString("close movie", 0&, 128, 0)
    Ret = mciSendString("open AVIvideo!" & A$ & " alias movie parent " & Form1.hWnd & " style child", 0&, 128, 0)
    Ret = mciSendString("put movie window client at " & x & " " & y & " 0 0", 0&, 128, 0)
    Ret = mciSendString("play movie", 0&, 128, 0)
    End Sub

    Private Sub Form_Terminate()
    Dim Ret As Long
    Ret = mciSendString("close all", 0&, 128, 0)
    End Sub

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured