怎样关闭MessageBeep声音
我利用MessageBeep实现声音报警,当点击确认键后在停止声音报警,但是怎样停呢?
public enum BeepType
{
SimpleBeep = -1,
IconAsterisk = 0x00000040,
IconExclamation = 0x00000030,
IconHand = 0x00000010,
IconQuestion = 0x00000020,
Ok = 0x00000000,
}
[DllImport("user32.dll")]
public static extern bool MessageBeep(BeepType beepType);
然后在用的地方调用 MessageBeep(BeepType beepType);