Solved

Running an AVI file in Visual Basic

Posted on 2001-08-02
5
286 Views
Last Modified: 2013-11-25
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
Comment
Question by:gondesiravi
5 Comments
 
LVL 33

Accepted Solution

by:
hongjun earned 20 total points
ID: 6344246
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
 
LVL 33

Expert Comment

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

hongjun
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6344272
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
 
LVL 1

Author Comment

by:gondesiravi
ID: 6344312
Hai ryancys

If use the above code

The avi file is running after the process is done

0
 

Expert Comment

by:rss2
ID: 14759874
What does aniSearch refer to in the accepted answer above?
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now