Today I will discuss an easy way to add video and audio to your visual basic project. Such thing will make your project more attractive for your clients. It is not a difficult job. In the other hand, it will allow you to build great projects as simple interactive games, shows and more.


Let us start:


Lunch Microsoft Visual Basic, mine is 2005 express.


lunch visual basic 2005

Start a new project, call it “videoAudio “

new project video audio

Using mouse right click, click on the toolbox. Then choose “choose items”. Go to COM Components tab. Scroll down the list. Now you should select “windows media player”. “wmp.dll” is for the newer version of windows media player, while “msdxm.ocx” is for the older version. Click “ok” and you will find them in the toolbox.

embed3

Choose windows media player component and draw it on your form.

embed4

Go to the component properties and change the “URL” to the path of your media file.

embed5

Run your program and try to smile :)

embed6

Now let us think for a moment. What we did is not amazing at all. So we need to polish it a little. This is depends on our use for this component.
How could I utilize this component?

Let us think for a moment. You may have such idea as following:

  • Use it to play opening video
  • Use it to play background music
  • And more

You may download copy of videoAudio from here
Download: videoaudio

all the best :)

Related Posts

  1. playing music using java audioClip
  2. Create configuration file for your application
  3. java imageBox (0.0.6)
  4. usefulness of corrupted files
  5. Crystal and MS Acess Legend adjustments
Print This Post