C
Cokegod
Guest
I have a simple program that plays mp3's, but when i try to call my play sub, it gives me the System.NullReferenceException error.
Here's The Code:
(In a different Form)
Dim a as form1
a.play("C:a.mp3")
(In Form1)
Public Sub Play(ByVal Song As String)
If IsPaused Then
mciSendString("RESUME " & Song, 0&, 0, 0)
IsPaused = False
Else
mciSendString("OPEN " & Song, 0&, 0, 0)
mciSendString("PLAY " & Song, 0&, 0, 0)
End If
End Sub
Here's The Code:
(In a different Form)
Dim a as form1
a.play("C:a.mp3")
(In Form1)
Public Sub Play(ByVal Song As String)
If IsPaused Then
mciSendString("RESUME " & Song, 0&, 0, 0)
IsPaused = False
Else
mciSendString("OPEN " & Song, 0&, 0, 0)
mciSendString("PLAY " & Song, 0&, 0, 0)
End If
End Sub