Groups | Blog | Home
all groups > dotnet compact framework > september 2003 >

dotnet compact framework : Playsound Alert


google NO[at]SPAM winbasic.com.au
9/7/2003 11:20:20 PM
Hi,

Using PlaySound in CF VB.NET, how can I have it play continuously (up
to a 3 minute limit) or until a user presses a button? I need an alert
to appear on the device when a condition is met and I want the audible
alert to loop until either 3 minutes has expired, or the user has
pressed a button - e.g. the OK button on a MessageBox displaying the
alert.

Thanks in advance!

Regards,

Peter Foot [MVP]
9/8/2003 7:38:00 AM
You need to use two flags in your call to PlaySound
Async - so your sound plays and your application continues to execute
Loop - to continuously loop the sound

Then when you want to stop the sound, call PlaySound with a null sound name
and all wave audio will be cleared.

If you are using the OpenNETCF.WinAPI implementation the flags are defined
in the SoundFlags enumeration.
http://www.opennetcf.org/winapi.asp

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com

[quoted text, click to view]

AddThis Social Bookmark Button