How do I play a song within a program ?
-
Hey guys, i just started to learn some thing on VB, so i came up with this quuestion. I'll be glad if you could help me :)
-
Hey guys, i just started to learn some thing on VB, so i came up with this quuestion. I'll be glad if you could help me :)
Don't post the same question multiple times. It'll just piss people off and get you ignored.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Don't post the same question multiple times. It'll just piss people off and get you ignored.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave KreskowiakThis works:
Private Sub cmdPlay_Click() Const ksBSlash As String = "\" Dim sFilespec As String ' Note: This code requires the: WindowsMediaPlayer activex (wmp.dll) ' first add it to resorces then add it to a form as an activex componet. ' cboTuneLU has these fields: ' ID ' Filename ' Path On Error GoTo ERR_cmdPlay_Click ' Get the path & filename from cboTuneLookup sFilespec = Me.cboTuneLU.Column(2) & ksBSlash & Me.cboTuneLU.Column(1) Me![WindowsMediaPlayer7].openPlayer sFilespec EXIT_cmdPlay_Click: Exit Sub ERR_cmdPlay_Click: 'Debug.Print CStr(Err) & " " & Err.Description ShowError "frmLyrics.cmdPlay_Click" Resume EXIT_cmdPlay_Click End Sub