
Need help to show AVI animation
Why don`t you do it like this :
There a Form1 with a Commandbutton on it .
If you click this button a Form2 will be loaded and
displayed with the ActiveMovie-Control on it ; its Auto-
play-Property has to be set to true so that the .AVI-file
is immedeately [ correct spelling !? -- I don`t think so ... ]
shown . The timer you need / you got on that Form2
will close , resp. unload the form after the movie`s over .
In that case you can do the whole thing with very simple code :
just form.load / form.show / timer-event and unload form .
It works , I used it myself more than once .
Etienne Charland schrieb:
Quote:
> I have there a little program to show an animation in a windows when I
> click the button, but the program doesn't work. I tried to modify it
> in several ways, but I didn't find any way to let it work. I use the
> ActiveMovie control(amovie.ocx) with an autostart property set to
> True. Here are the codes I use.
> in Form1:
> Private Sub Command1_Click()
> FormeAnimation.Anim.FileName = App.Path & "\Bravo.AVI"
> FormeAnimation.Show 1
> End Sub
> in FormeAnimation:
> Private Sub Anim_StateChange(ByVal oldState As Long, ByVal newState As
> Long)
> If newState = 0 Then Unload Me
> End Sub
> When the animation finish to play, it is supposed to unload the form.
> Here is the complete files(VB6) with the animation: AVI.ZIP
> I hope you can help me. Thanks