Mikey205 Posted May 6, 2004 Posted May 6, 2004 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 ;) Quote
Leaders Iceplug Posted May 6, 2004 Leaders Posted May 6, 2004 Check out the PlaySound API: It'd probably be similar to this... but I can't try it out here since on our lab computers you shouldn't play sound. :) http://www.xtremedotnettalk.com/showpost.php?p=382821&postcount=4 Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Leaders dynamic_sysop Posted May 6, 2004 Leaders Posted May 6, 2004 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); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.