Running an AVI file in Visual Basic

I developed an application in visual basic which retrieves huge valid data from back end it takes some time to complete the process in the mean time I want an avi file running on the screen and once the process is done it should stop the AVI file.

Its something like when we are copying files in windows during the process it displays the file copy avi and once the copy process is over the avi also gets stopped.


How to do this in visual Basic
LVL 1
gondesiraviAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hongjunConnect With a Mentor Commented:
Add this
Project->Components then check "Microsoft Windows Common Controls-2 6.0

Private Sub Form_Load()
     aniSearch.Open App.Path & "\Search.avi"
End Sub

Private Sub Start()
     Animation1.AutoPlay = True
     ' your do while statement
          ' Add this in your do while statement
          DoEvents
     ' end of your do while statement
     Animation1.AutoPlay = False
End Sub

hongjun
0
 
hongjunCommented:
The trick is to use DoEvents and the animation control from "Microsoft Windows Common Controls-2 6.0"

hongjun
0
 
Ryan ChongCommented:
Hi gondesiravi,

You can use the Microsoft Media Player Control, add it from Project > Component:

Private Sub Form_Load()
    MediaPlayer1.Open "C:\Program Files\Microsoft Visual Studio\Common\Graphics\Videos\Download.avi"
End Sub

'Hope will help.
0
 
gondesiraviAuthor Commented:
Hai ryancys

If use the above code

The avi file is running after the process is done

0
 
rss2Commented:
What does aniSearch refer to in the accepted answer above?
0
All Courses

From novice to tech pro — start learning today.