Using an .avi file on a visual Basic Form

I am developing a VB Desktop application. What i want is that when the exe file is run, a form should run a .avi file. after the file has ended, the start up form (or the main form ) my project should be loaded. I have tried using Component (Microsoft Active Movie Control) but am unable to achieve the desired result. Thanks in advance to everybody who send a solution
Who is Participating?

Improve company productivity with a Business Account.Sign Up

AndrewDevConnect With a Mentor Commented:
Example using the Microsoft animation control

Your solution

Visit my website and download the Digital Diary program

It has the code for playing an avi file

If you cannot understand the code Please tell me I will explain it to you
there's load of samples for using a AVI from VB out there....

Just look at and try something like 'AVI sample VB'

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

I used the MMControl like this in a command button.

Private Sub cmdVideo7_Click()
Dim dbName As String
    dbName = App.Path & "\video7.avi"
    MMControl7.Visible = False
    MMControl7.Notify = False
    MMControl7.Wait = True
    MMControl7.Shareable = False
    MMControl7.DeviceType = "AVIVideo"
    MMControl7.FileName = App.Path & "\video7.avi"
    MMControl7.AutoEnable = True
    ' Open the MCI WaveAudio device.
    MMControl7.Command = "Open"
    MMControl7.Command = "Play"
End Sub

If you change some of the properties and put it under the form load I think it will play the avi file when the form loads.
Try altering my code and putting it under the form load.
Hi Hi@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept AndrewDev's comment(s) as an answer.

Hi@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

E-E Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.