Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / March 2004



Tip: Looking for answers? Try searching our database.

VB app to call Media Player

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 07 Mar 2004 01:37 GMT
Hi ALL!
I need to create a command button that will play an mp3 on Media Player. Can
anyone help? Thanks in advance.
"Peter Huang" - 07 Mar 2004 09:46 GMT
Hi Michael,

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to play mp3 using
windowsmediaplayer by click a button on the vb6 form.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I think you can add a windows media player control onto the form and run
the code below.
Private Sub Command1_Click()
Me.WindowsMediaPlayer1.URL = "c:\test.mp3"
Me.WindowsMediaPlayer1.Controls.play
End Sub

Or you can run the shell command to run the windows mediaplayer.

Private Sub Command1_Click()
Shell "C:\Program Files\Windows Media Player\wmplayer.exe c:\test.mp3",
vbNormalFocus
End Sub

Please apply my suggestion above and let me know if it helps resolve your
problem.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.