|
-
Nov 29th, 1999, 01:25 AM
#1
Thread Starter
Member
The following code is not fancy, but it does work.
Private Sub Command1_Click()
Dim sCmd As String
sCmd = "mplayer.exe /Play c:\your.mp3"
Shell sCmd, vbMinimizedNoFocus
End Sub
-
Nov 29th, 1999, 01:44 AM
#2
Thread Starter
Member
Another way to do this is to include the Multimedia (MCI) control in your VB project. You can then place an MCI control on a form and use the following code in the forms load event.
Private Sub Form_Load()
MMControl1.Wait = True
MMControl1.FileName = "C:\your.mp3"
MMControl1.Command = "Open"
End Sub
-
Nov 29th, 1999, 01:56 AM
#3
Hyperactive Member
Maybe you could use the RealAudio ActiveX control. I know that you can use RealPlayer to play Mp3s, but I'm not sure if the ActiveX control would do the trick. But if it does I recommend you use it because it's very easy to use.
------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com
-
Nov 29th, 1999, 12:24 PM
#4
Hyperactive Member
I would like to play a mp3 when I click a button.
howto ?
-
Nov 29th, 1999, 12:27 PM
#5
Hyperactive Member
go to vbcode.com and do a search for mp3 or look under the music/sound title. There are lots of examples and codes to do it.
-
Nov 29th, 1999, 12:34 PM
#6
Hyperactive Member
I know.... But those are usually complete winamp clone type stuff...
I just want a few lines of code that run an predefined mp3, no fancy ****...
I know I could easily extract that out one of those examples but I thought maybe someone knew on with just a few lines of code by hart...
thanks anyway....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|