Hello,
You may've to use win32 api using PInvoke. Here's the sample...
sealed class Win32
{
[DllImport("user32.dll")]
public static extern int MessageBeep(uint n);
private Win32()
{
}
//
http://msdn.microsoft.com/msdnmag/issues/03/07/net/
/// <summary>
/// Managed call to the win32 beep function.
/// </summary>
/// <param name="type"></param>
public static void MessageBeep(BeepTypes type)
{
if(MessageBeep((UInt32) type) == 0)
{
Int32 err = Marshal.GetLastWin32Error();
throw new Win32Exception(err);
}
}
}
enum BeepTypes
{
Simple = -1,
Ok = 0x00000000,
IconHand = 0x00000010,
IconQuestion = 0x00000020,
IconExclamation = 0x00000030,
IconAsterisk = 0x00000040
}
Letme knw if it helps you.
Thanks,
Vijai
Frank said:
Is there a .NET replacement for the Beep method in the Win32 API? I want
to just sound a simple noise when clients move from control to control, or
when illegal values are entered.