user187573
user187573

Reputation: 171

vb6 Multimedia query

How can I add an animated file on VB form? What extention does it support?

Upvotes: 1

Views: 70

Answers (1)

C-Pound Guru
C-Pound Guru

Reputation: 16368

Use the Animation Control which is part of the MSCOMCT2.OCX file. It plays silent avi files. Here's the MSDN Article on using the Animation Control.

Code sample:

' Code to play an .avi file
Private Sub cmdPlay_Click()
   ' Configure a CommonDialog control to allow the
   ' user to find .avi files to play. The CommonDialog
   ' control is named "dlgOpen." The Animation control
   ' is named "anmAVI."
   dlgOpen.Filter = "avi files (*.avi)|*.avi"
   dlgOpen.ShowOpen
   anmAvi.Open dlgOpen.FileName
   anmAVI.Play
End Sub

' Code to stop play
Private Sub cmdStop_Click()
   anmAVI.Stop
End Sub

Upvotes: 1

Related Questions