Results 1 to 4 of 4

Thread: [RESOLVED] Video on Form load

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2010
    Posts
    51

    Resolved [RESOLVED] Video on Form load

    what component can i use for Video on form load???

  2. #2
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Video on Form load

    Hmm, lots of them in no particular order
    1) MMControl (MS Multimedia Control)
    2) Windows Media Player
    3) MCI Api - not really a control, just api code
    4) ActiveMovie - see code below

    Note: only tested on .mpg & .mpeg files
    Code:
    Option Explicit
    'ref to ActiveMovie control type library
    ' (quartz.dll)
    Private Player As QuartzTypeLib.FilgraphManager
    Private Sub Form_Load()
     Set Player = New FilgraphManager
     '**********change the file path below***********
     Player.RenderFile "C:\MyDocs\Videos\Beatles - You're Gonna Lose That Girl.mpg"
     Player.Run
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
     Player.Stop
     Set Player = Nothing
    End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2010
    Posts
    51

    Re: Video on Form load

    Quote Originally Posted by VBClassicRocks View Post
    Hmm, lots of them in no particular order
    1) MMControl (MS Multimedia Control)
    2) Windows Media Player
    3) MCI Api - not really a control, just api code
    4) ActiveMovie - see code below

    Note: only tested on .mpg & .mpeg files
    Code:
    Option Explicit
    'ref to ActiveMovie control type library
    ' (quartz.dll)
    Private Player As QuartzTypeLib.FilgraphManager
    Private Sub Form_Load()
     Set Player = New FilgraphManager
     '**********change the file path below***********
     Player.RenderFile "C:\MyDocs\Videos\Beatles - You're Gonna Lose That Girl.mpg"
     Player.Run
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
     Player.Stop
     Set Player = Nothing
    End Sub


    is ActiveMovie a component???

  4. #4
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Video on Form load

    No, as I said in my post, set a reference (Project|References) to the ActiveMovie control type library.
    If it doesn't appear in the list, browse to your system folder & select quartz.dll.

    There is a control in the toolbox called MS ActiveMovie but it is actually Windows Media Player
    (msdxm.ocx), not to be confused with the other Windows Media Player (wmp.dll).

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