Link to home
Start Free TrialLog in
Avatar of Obsolate
Obsolate

asked on

how to play sound (wav) on .net compact framework?

Hi, again me...

I want to learn how to play sound (wav, mp3 or wma) on .Net Compact Framework.
(Pocket PC 2003)

Thanks i bag you please answer me...
Avatar of Mikal613
Mikal613
Flag of United States of America image

Option Explicit
Public Declare Function CreateProcess Lib "coredll" Alias "CreateProcessW" ( _
    ByVal pszImageName As String, _
    ByVal pszCmdLine As String, _
    ByVal psaProcess As Long, _
    ByVal psaThread As Long, _
    ByVal fInheritHandles As Long, _
    ByVal fdwCreate As Long, _
    ByVal pvEnvironment As Long, _
    ByVal pszCurDir As Long, _
    ByVal psiStartInfo As Long, _
    ByVal pProcInfo As Long) As Long
'pword.exe should be peplaced by t he the Mediaplayer exe
'strFileName is the file name
Private Sub Command1_Click()
    Dim lnCreateProcess As Long
    Dim strFileName As String
    strFileName = "\My Documents\DocName.psw"
    On Error Resume Next
    lnCreateProcess = CreateProcess("\Windows\pword.exe", strFileName, 0, 0, 0, 0, 0, 0, 0, 0)
    If lnCreateProcess = 0 Then
        MsgBox Err.Description
    End If
End Sub
How did this work out ? Did you spawn a seperate process to do it or did you use the API ?
Avatar of Obsolate
Obsolate

ASKER

thanx for your help.. but
I'm don't work this codes.. i'm don't use API , i new user to visual basic. very hard (visual hard) :)
how to more basic code? (  play("\test.mp3") )

Comment from Mikal613
Date: 04/27/2004 04:49PM EEST
answers not running
ERROR : NotSupportedException

i'm 0.003 % speak english. ok!!

ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial