473,799 Members | 2,907 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make a beep sound in VC++ .NET

2 New Member
Using VC++ .NET, How can you

1. Play sound or
2. start BEEP sound
Jun 4 '07 #1
1 3155
blackjack2150
79 New Member
Using VC++ .NET, How can you

1. Play sound or
2. start BEEP sound
Very easy.

This code is for C#, but it should be no trouble to adapt it to C++.

So, for beep it's as easy as

System.Console. Beep();

If you'd like another sound played on the speakers(like a systemsound), use:

System.Media.So undPlayer sp = new System.Media.So undPlayer("C:\\ Windows\\Media\ \chord.wav");
sp.Play();
Jun 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2311
by: Ivo | last post by:
In an Win/IE-only application, some checkboxes and the like have been assigned accesskeys, so pressing alt+w focuses a checkbox, alt+b another. This is very convenient. However, when the checkboxes are hidden, for example because they are in a div styled "display:none", pressing the magic key combination does not work of course, but instead Windows generates an warning beep, a sound. Now I have written a function that will toggle the...
3
2704
by: QA | last post by:
When the page is refreshed/reloaded, Mozzila or Opera are fine, but in IE, it has a Beep Sound. Is there a way to turn it off from JS or serverside?
1
2186
by: Denise | last post by:
Does anyone know how to play a sound that is different from the sound you get by calling beep()? When the user presses 'Save', I don't want to display a dialog box each time saying that the save was successful, but I would like a simple audible indication. I'd like to use the same sound that plays when showing a messagebox with MessageboxIcon.Information.
1
3158
by: strancho | last post by:
hi guys: i am rather new to C++. By using beep(hz, duration), I figured out a way to drive computer speaker. However, my project requires me to create sound from the sound card. Do you happen to know how this works? or is there a command like that? I was going to generate it from wave file. However, it is just too cumbershome.. thanks for the help
4
9955
by: =?Utf-8?B?UmljaA==?= | last post by:
When I press the Enter key in a Textbox I get a beep sound. But when I press the Enter key in a combobox, I don't get the beep sound. Is there a way to suppress the beep? How to do this? Thanks
10
1406
by: sandy111 | last post by:
wat r these c# wrappers? how can it play in and around c++ dlls plese help me out
3
3886
by: ramya naidu | last post by:
Hai iam working on a project were i have some textboxes in that one textbox should allow only digits from 0 to 360 and for that i have a error provider when i enter 361 the error provider blinks i need a beep sound when that error provider blinks how can i get this beep sound plz any one help me in this
1
5519
by: ghjk | last post by:
I developed web application using php. Now I want to add alarm to one of my page.There is a column which displays the database value and when the data exceed the threshold values i want to make a sound. How can i do that? Please help me.
3
3872
by: IgorZ | last post by:
Can some 1 tell me why am i getting an Build error here? Everything seems to be fine... #include<iostream> #include<windows.h> using namespace std; int main() { Sleep(1000);
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10249
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10025
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6804
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5461
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.