PC Review


Reply
Thread Tools Rate Thread

How do I invoke System Beep in Windows Forms?

 
 
=?Utf-8?B?QW50b24=?=
Guest
Posts: n/a
 
      16th Mar 2005
Where is the command for making a system beep (to indicate an error)?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QnJpYW4gS2VhdGluZw==?=
Guest
Posts: n/a
 
      16th Mar 2005
have a look at PInvoke.net and use the win32 Beep function

else import the microsoft.vb namespace there is a function in there somewhere,
if u can't find it let me know and i'll search it out for you.


"Anton" wrote:

> Where is the command for making a system beep (to indicate an error)?

 
Reply With Quote
 
=?Utf-8?B?QW50b24=?=
Guest
Posts: n/a
 
      16th Mar 2005

This is obvious missing in C#.NET, why??
So much for managed code...

This works, but is not managed code:

[DllImport("user32.dll")]
private static extern bool MessageBeep(int uType);

MessageBeep(-1);


 
Reply With Quote
 
=?Utf-8?B?QW50b24=?=
Guest
Posts: n/a
 
      16th Mar 2005

Or...

Add References: Microsoft.VisualBasic

Microsoft.VisualBasic.Interaction.Beep();


Seems they forgot the beep i C#?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make windows play a sound instead a system beep? =?Utf-8?B?U2hhbmU=?= Microsoft Outlook Discussion 0 19th May 2005 02:29 PM
How do I know System.Windows.Forms.TextBox in System.Windows.Forms lose Active? Frank Lee Microsoft Dot NET Framework 3 6th May 2005 12:20 PM
System.Windows.Forms.Control.Invoke() throws ArgumentException aftersp1 Nicki Carstensen Microsoft Dot NET Framework Forms 1 16th Nov 2004 08:22 AM
System Produce BEEP BEEP BEEP.... Desmond Microsoft Windows 2000 4 8th Jun 2004 09:38 PM
Windows 2000, Sound Card and System Beep Steven Fillingham Microsoft Windows 2000 Hardware 0 22nd Oct 2003 11:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:16 AM.