Solved

Running an AVI file in Visual Basic

Posted on 2001-08-02
5
293 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 50

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

790 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