I wrote a little class to do the Beepin'
//-----------------------------------------------------------------
//-----------------------------------------------------------------
/// <summary>
/// Used for the different beep types
/// </summary>
public enum SoundType : int {
/// <summary>
/// A default beep. If no sound card is available, this will use the
speaker
/// </summary>
SIMPLEBEEP = -0x0001,
/// <summary>
/// The OK Beep
/// </summary>
MB_OK = 0x0000,
/// <summary>
/// The Icon Hand Beep
/// </summary>
MB_ICONHAND = 0x0010,
/// <summary>
/// The Question Beep
/// </summary>
MB_ICONQUESTION = 0x0020,
/// <summary>
/// The exclamation beep
/// </summary>
MB_ICONEXCLAMATION = 0x0030,
/// <summary>
/// the asterisk beep
/// </summary>
MB_ICONASTERISK = 0x0040
}
/// <summary>
/// Used to do the VB Beep function
/// </summary>
public class Beep {
private Beep(){}
/// <summary>
/// Just like the VB Beep function. Use the API.SoundType enum for
beep types
/// </summary>
[DllImport("User32")]
public static extern bool MessageBeep(SoundType SoundType);
}
//-----------------------------------------------------------------
//-----------------------------------------------------------------
Saurabh said:
I think you will have to use the windows API. Don't know any direct way of
doing it in Managed code.
C++)
in