Solved

How to play a AVI file within a form?

Posted on 2006-11-02
12
237 Views
Last Modified: 2010-04-23
Hey whats up expert I have a simple question how can I play a simple AVI file without user interaction.
Kinda like the same action you see when you are searching for files in windows or deleting a file ('recycling bin tossing paper') etc.

the idea is that I have my user click on a button to do a search within my program..but I would like to add a bit more life to my program by adding perhaps a small avi file so when he/she clicks on the search you can see it in action until the search finishes.

...so pretty much I would like to know how can i added it..do I put it in a picturebox or etc or do i need to call it...

Thank you for your time...and as you can see I never tried to playing any type of media file in a program.

0
Comment
Question by:saruman101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 10

Expert Comment

by:Kinger247
ID: 17860341
0
 

Author Comment

by:saruman101
ID: 17860536
I just saw your link
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21444953.html?query=avi&topics=866

and I was going to say wow is there an easier way to do this..i mean I just want to play a small avi file or just something simple to have on the form that wouldn't require all those declarations of functions and classes.

is there another way..or this is it?
0
 
LVL 10

Accepted Solution

by:
Kinger247 earned 125 total points
ID: 17860701
You could convert an avi to a gif then load it into a picture box (with sizemode = autosize).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:saruman101
ID: 17860784
excellent it works..now how do we get it stop lol
pretty much Im using the same animation that comes with visual studio 2005...the one specifically im using is the magnifying glass which moves around and around....the point behind this is that again once the user presses search i want this to move as it does normally in the picturebox...but once it finish the search then it should just either clear out or stop either one is find by me.
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17861474
[picturebox].BackgroundImage = Nothing

or make the picturebox invisible.
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17861483
or create one that is just the first image (so no movement) and swap the visible picturebox between the 2.
0
 

Author Comment

by:saruman101
ID: 17862026
I like your idea of
"  or create one that is just the first image (so no movement) and swap the visible picturebox between the 2."
 is there a way i can set a timer to display this perhaps for a few second and then switch over to the still image?
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17862081
You could set a timer, but then isn't the image being animated for the duration of the process ?
I'd start with the still image, then swap to the animated for just the duration of the process then swap back again.

0
 

Author Comment

by:saruman101
ID: 17868356
I tried to do what you said..but my program does the search so fast...either because there is not enough data to fetch to..it does it so fast that you can't even see the difference in image swap. Meaning that the 2nd image does not occur what so ever.

0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17868463
Will thos always be the case ?  will the searching procedure always be quick ?
If so, then theres not point in the animation ...  otherwise it'll be ok.

I'd leave as is, so it covers any lengthy searches (just in case).
0
 

Author Comment

by:saruman101
ID: 17868507
you are correct on that obviously the data fetch will grow in time and things will get more complex as the search will have to do more fetching in the future. Thanks for helping put the gif in a picture box..I kinda figure GOD it can't be that crazy to put an avi file just to do a simple 2-3 sec movement lol.

Thanks again :)
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17868562
no problem
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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