Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing sounds

Status
Not open for further replies.

Flupke

Programmer
Jun 26, 2002
94
BE
Hello,

In VB6, I used an API to play sounds.

Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name
As String, ByVal hmod As Integer, ByVal flags As Integer) As Integer

Public Const SND_SYNC As Long = &H0
Public Const SND_ASYNC As Long = &H1
Public Const SND_FILENAME As Long = &H20000
Public Const SND_RESOURCE As Long = &H40004

Is there a better, more .NET-way, to have the same result in VB.NET, or is it still OK to use the API-call?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel
 
.NET 2.0 will have a method for playing sound files, but version 1.1 does not. The API's still the way.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top