URGENT - Playing a sound in runtime

compugeek

Member
Joined
Aug 21, 2003
Messages
12
Location
USA
How do you play a sound from the users computer in runtime? In VB6, you added the Media Player control - how do you play sound in VB.NET?

Thanks for any help!
 
The same way you did in VB6 -> [api]PlaySound[/api].
Convert that declare to VB.Net as demonstrated here and you get:

Code:
Declare Ansi Function PlaySound Lib "winmm" Alias "PlaySoundA" _
    (ByVal lpszName As String, ByVal hModule As Integer, ByVal dwFlags As Integer) As Integer
 
Back
Top