MessageBeep in the .NET Framework


This has come by in
email a few times, so I thought I’d post it here. style="mso-spacerun: yes"> 
Clearly this is a hole in the V1 and we
are addressing it in Whidbey. "urn:schemas-microsoft-com:office:office" />


Until
then:


style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">public style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> style="COLOR: blue">enum MessageBeepType
{
   
Default = -1,
    Ok = 0x00000000,
    Error
= 0x00000010,
    Question = 0x00000020,
   
Warning = 0x00000030,
    Information =
0x00000040,
}


style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">[DllImport(“user32.dll”,
SetLastError=true)]
style="COLOR: blue">public static style="COLOR: blue">extern bool
MessageBeep(
    MessageBeepType
type
);


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 

Comments (6)

  1. MessageBeep has become truly established as the "Hello, World!" of interop. Take that away, and we’ll have to find something else! 😉

  2. As soon as you’ll add MessageBeep I’m sure you’ll start receiving request for PlayWaveFile so think about it in advance 😉

  3. Brad Abrams says:
  4. Your example helped save the day (and a few extra hours)!

    Thanks!

  5. I love to hear that — thanks!

  6. Carp says:

    just goes to show what a total joke .WANK is