Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

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
0
gondesiravi
Asked:
gondesiravi
1 Solution
 
hongjunCommented:
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

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now