Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I know this is probably very simple, but does anyone know how to play a .wav file? I'm building a windows app and want to play a sound when a button is hit........

 

Any help is appreciated ;)

  • Leaders
Posted

J# has a great in-built win32 Package , you can use it to play sound ( and nearly all api calls / constants are in it ) , eg: to play sound ...

[color=Green]// this is in J#[/color]
[color=Blue]private void[/color] button1_Click (Object sender, System.EventArgs e)
{
	com.ms.win32.Winmm.PlaySound("C:\\WINDOWS\\MEDIA\\Windows XP Startup.wav" , 0 , com.ms.win32.wins.SND_FILENAME | com.ms.win32.wins.SND_ASYNC);
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...