471,338 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

sound alarm in visual studio 2003

I have been trying to play sound files in visual studio 2003 at a specific time (that is a kind of sound alarm) but unfortunately i've not been able to find a way out. I will appreciate it if someone can help me out with this.
Jun 7 '07 #1
2 1216
kenobewan
4,871 Expert 4TB
Welcome to TSDN. Here is an article that may help:
Playing sound files
Jun 7 '07 #2
dip_developer
648 Expert 512MB
I have been trying to play sound files in visual studio 2003 at a specific time (that is a kind of sound alarm) but unfortunately i've not been able to find a way out. I will appreciate it if someone can help me out with this.
you need API function call to play a sound from your computer....

Expand|Select|Wrap|Line Numbers
  1. Declare Auto Function sndPlaySound Lib "WINMM.DLL" (ByVal FileName As String, ByVal Options As Int32) As Int32
Then call the function with the name of the sound file as a parameter

Expand|Select|Wrap|Line Numbers
  1. sndPlaySound(mySoundfile, SND_ALIAS And SND_NOWAIT)
for specific time interval you can use a Timer control
Jun 7 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Ricardo Dias Marques | last post: by
1 post views Thread by Daniel A. Thomas | last post: by
2 posts views Thread by scottech | last post: by
reply views Thread by Jude Upperman | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.