c#
Beep();
Main Topics
Browse All Topics
Hello,
I'm developing a handheld barcode scanning application and have a textbox that accepts the input. All is well except I would like a simple "beep" after I detect the input.
Is there a simple API call, etc. that can do this? I don't need anything fancy like playing a wav file, etc. (Maybe for version 2).
VS 2005 - WM 5.0 - CF 2.0 - C#
Joe
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://msdn2.microsoft.com
Your lucky that you are using the CF2.0
Its supported in CF 2.0 also
http://msdn2.microsoft.com
It actually might be easier to play the wav file. :)
Actually you can do the following:
Microsoft.VisualBasic.Inte
You just need to add a reference to Microsoft.VisualBasic.dll in the project.
Or you can p/invoke:
[DllImport("kernel32.dll")
public static extern bool Beep(int freq,int duration);
Thanks... what am I doing wrong in this test program? Getting:
System.MissingMethodExcept
Message="Can't find PInvoke DLL 'kernel32.dll'."
using System;
using System.Collections.Generic
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServ
namespace Beep
{
public partial class Form1 : Form
{
[DllImport("kernel32.dll")
public static extern bool Beep(int freq,int duration);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Beep(1000,1000);
}
}
}
This was a more detailed solution and targeted for the CF:
http://blogs.msdn.com/brad
Business Accounts
Answer for Membership
by: Mikal613Posted on 2006-11-18 at 16:53:10ID: 17973053
try
Beep()