Sound in J#

Mikey205

New member
Joined
May 5, 2004
Messages
1
I know this is probably very simple, but does anyone know how to play a .wav file? Im building a windows app and want to play a sound when a button is hit........

Any help is appreciated ;)
 
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 ...
C#:
[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);
	}
 
Back
Top