In lesson 20, you have learn how to create an audio player. Now, by making some modifications, you can transform the audio player into a multimedia player. This player will be able to search for all types of movie files and audio files in your drives and play them.
In this project, you need to insert a ComboBox, a DriveListBox, a DirListBox, a TextBox ,a FileListBox and a picture box (for playing movie) into your form.We shall briefly discuss the function of each of the above controls. Besides, you must also insert Microsoft Multimedia Control(MMControl) into your form , you may make it visible or invisible. In our program, we make it invisible and insert a few command buttons and use them control the player.
Step 1: User chooses the type of files he wants to play.
Step2:User selects the drive that might contains the relevant audio files.
Step 3:User looks into directories and subdirectories for the files specified in step1. The files should be displayed in the FileListBox.
Step 4: User selects the files from the FileListBox and clicks the Play button.
Step 5: User clicks on the Stop button to stop playing and Exit button to end the application.
'To fix the player size
'To select types of media files
If ListIndex = 0 Then
Private Sub Dir1_Change()
'To search the directories or folders for the media files
File1.Path = Dir1.Path
Private Sub Drive1_Change()
'To Change Drives
Dir1.Path = Drive1.Drive
'To load the selected file
If Combo1.ListIndex = 0 Then
MMPlayer.FileName = Text1.Text
If MMPlayer.Mode = 524 Then Exit Sub