How to make simple Play Media Player from visual basic 6.0



             Coding vb 6.0 how to make Media Player,today i want to share about my coding for make media player like music and video.I try this in my vb and its works.With this coding you can make video player and music player from vb 6.0 on your own.and can Play Media on your own.

Before you guys try you must add component from left bar,add windows media player,and common dialog.then make command button for play media, pause,and add some listbox and one button for open common dialog


Try this code:

Private Sub button1_Click()
Dim Filename As String
On Error GoTo akhir
d.ShowOpen
Filename = d.FileTitle
akhir:
List1.AddItem Filename
CancelError = True
End Sub
Private Sub button2_Click()
wm.Controls.play
wm.URL = d.FileTitle
wm.URL = d.Filename

Timer1.Enabled = True
End Sub

Private Sub button3_Click()
wm.Controls.pause
End Sub

Private Sub button6_Click()
List1 = ""
List1.Clear
End Sub

Private Sub button7_Click()
End
End Sub

Private Sub Command1_Click()
If wm.playState Then
wm.fullScreen = True
End If

End Sub

Private Sub Form_Load()
wm.settings.autoStart = True
wm.uiMode = "none"
wm.windowlessVideo = True
End Sub

Information d = common dialog
                      wm = windows media player

 if there something didnt work can add on comment below :)
Tag : Coding, VB 6
0 Komentar untuk "How to make simple Play Media Player from visual basic 6.0"

Back To Top