473,396 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Where is MessageBeep?

I'm intrigued, MessageBox has gone to MessageBox.Show; but where is
MessageBeep?

I've trawled the help and cannot find any reference to it! The only instance
I've seen is using the following to import it from user32.dll:

[DllImport("user32.dll")]
public static extern bool MessageBeep(BeepType beepType);

Surely MessageBeep cannot have been omitted from the framework.

TIA

- Andy
Nov 15 '05 #1
2 9277
> Surely MessageBeep cannot have been omitted from the framework.

Yep....In C# namespace anyway.

Include the VisualBasic.net rumtime dll

import this namespace: using Microsoft.VisualBasic;

Now you have access to the manged function:

Interaction.Beep();

But thats is hove far you get. Else you should look at:
http://www.codeproject.com/csharp/MessageBeep.asp

Hope it helps
Regards Anders, DK


Nov 15 '05 #2
Hi Andy,

Thanks for your post!

It seems the .Net Framework doen't provided the MessageBeep() interface,
however I think it is not very complicated to load it via Win32 library.

The following article have told some reasons why the Framwork hasn't
provided managed interfaces to many common Win32 operations and have some
examples about how to call Win32 API in .NET programe, maybe you have
already read it.

Article: "Using Win32 and Other Libraries"
http://msdn.microsoft.com/library/de...us/dncscol/htm
l/csharp09192002.asp

Gary Chang
Microsoft Online Partner Support
Get Secure! – www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
| From: "Andy Bates" <An********@UltimateSoftwareSolutions.com>
| Subject: Where is MessageBeep?
| Date: Thu, 9 Oct 2003 22:33:52 +0100
| Lines: 16
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eC**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: cpc3-farn1-6-0-cust68.glfd.cable.ntl.com 81.105.30.68
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:190389
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I'm intrigued, MessageBox has gone to MessageBox.Show; but where is
| MessageBeep?
|
| I've trawled the help and cannot find any reference to it! The only
instance
| I've seen is using the following to import it from user32.dll:
|
| [DllImport("user32.dll")]
| public static extern bool MessageBeep(BeepType beepType);
|
| Surely MessageBeep cannot have been omitted from the framework.
|
| TIA
|
| - Andy
|
|
|

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: diroddi | last post by:
I am having a problem using a dynamic where clause. I have a feeling that I am overlooking something very simple, although I can't seem to figure it out. The error i'm getting is: You have an...
47
by: Andrey Tatarinov | last post by:
Hi. It would be great to be able to reverse usage/definition parts in haskell-way with "where" keyword. Since Python 3 would miss lambda, that would be extremly useful for creating readable...
3
by: KathyB | last post by:
Hi, I have 2 tables: tblStations StationID Station tblStationUser RecordID UserName Station I'm trying to come up with a dataset that contains the
3
by: A.V.C. | last post by:
Hello, I found members of this group very helpful for my last queries. Have one problem with CASE. I can use the column name alias in Order By Clause but unable to use it in WHERE CLAUSE. PLS...
3
by: Xiangliang Meng | last post by:
Hi, all. In 1998, I graduated from Computer Science Dept. in a university in China. Since then, I've been using C Language for almost 6 years. Although I'm using C++ in my current job, I'm also...
10
by: Ray Stevens | last post by:
I am attempting to test a VeriSign account and the setup instructions stated that the certs file needed to go into the Windows\System32 folder. I am getting an error from the code-behind assebly...
7
by: Britney | last post by:
Original code: this.oleDbSelectCommand1.CommandText = "SELECT TOP 100 user_id, password, nick_name, sex, age, has_picture, city, state, " + "country FROM dbo.users WHERE (has_picture = ?) AND (sex...
2
by: 3c273 | last post by:
Hello, I was trying to use the MessageBeep fuction to play different system sounds, but using the syntax in the docs, all I can get is the default sound.. While I finally got my sounds to play...
5
by: comp.lang.php | last post by:
if ($willLimitByDB) $sql = preg_replace('/#(+)#/i', '$$1', $sql); This does not give me the results I want, instead of the value of $where in $sql, I literally get '$where' instead. How do I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.