P
pnp
When this executes
Win32.MessageBeep(BeepTypes.IconExclamation);
(or any of the other beep types) nothing is heard...
Any Ideas?
-----------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Runtime.InteropServices;
.....
sealed class Win32
{
[DllImport("user32.dll")]
public static extern int MessageBeep(uint n);
private Win32()
{
}
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
}
Win32.MessageBeep(BeepTypes.IconExclamation);
(or any of the other beep types) nothing is heard...
Any Ideas?
-----------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Runtime.InteropServices;
.....
sealed class Win32
{
[DllImport("user32.dll")]
public static extern int MessageBeep(uint n);
private Win32()
{
}
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
}