Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like
that one in VB but different from
Microsoft.VisualBasic.Interaction.Beep()
Thanks 10 2651
YOu can PInvoke PlaySound and fire the beep wave file. However, Interaction
is made for situations like this, and you don't lose anything by using it.
All it does is wrap that API anyway from what I've been told.
HTH,
Bill
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message
news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
YOu can PInvoke PlaySound and fire the beep wave file. However, Interaction
is made for situations like this, and you don't lose anything by using it.
All it does is wrap that API anyway from what I've been told.
HTH,
Bill
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message
news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
You could add a reference to "Microsoft Visual Basic .NET Runtime", and have
code like:
Microsoft.VisualBasic.Interaction.Beep();
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message
news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
You could add a reference to "Microsoft Visual Basic .NET Runtime", and have
code like:
Microsoft.VisualBasic.Interaction.Beep();
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message
news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
I've never done it but I presume you can call the MessageBeep API
--
Michael Culley
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
I've never done it but I presume you can call the MessageBeep API
--
Michael Culley
"Evgeny Zoldin" <ez*****@hotmail.com> wrote in message news:uO**************@tk2msftngp13.phx.gbl... Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
Evgeny Zoldin wrote: Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
Evgeny,
quickest way i can think of is echo control-g (ascii7), ie, if you're
creating a Console App :)
namespace BeepApp {
class BeepManager {
[STAThread]
static void Main(string[] args) {
BeepManager bm = new BeepManager();
bm.Beep();
Console.ReadLine();
}
public void Beep() {
Console.WriteLine((char)7);
}
}
}
Evgeny Zoldin wrote: Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
Evgeny,
quickest way i can think of is echo control-g (ascii7), ie, if you're
creating a Console App :)
namespace BeepApp {
class BeepManager {
[STAThread]
static void Main(string[] args) {
BeepManager bm = new BeepManager();
bm.Beep();
Console.ReadLine();
}
public void Beep() {
Console.WriteLine((char)7);
}
}
}
> Hi All, Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
Try using this:
using System;
using System.Runtime.InteropServices;
class MainClass
{
[DllImport("kernel32.dll")]
public static extern bool Beep(int freq,int duration);
public static void Main(string[] args)
{
Beep(1000,1000);
}
}
> Hi All, Does anybody know is it possible in C# call a Beep for system speaker like that one in VB but different from Microsoft.VisualBasic.Interaction.Beep()
Thanks
Try using this:
using System;
using System.Runtime.InteropServices;
class MainClass
{
[DllImport("kernel32.dll")]
public static extern bool Beep(int freq,int duration);
public static void Main(string[] args)
{
Beep(1000,1000);
}
} This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Leo |
last post by:
hi there
i want python to do a beep.
in the docu i found in tkinter the method
bell()
but the script:
import Tkinter
Tkinter.bell()
gives the error:
|
by: Evgeny Zoldin |
last post by:
Hi All,
Does anybody know is it possible in C# call a Beep for system speaker like
that one in VB but different from
Microsoft.VisualBasic.Interaction.Beep()
Thanks
|
by: Marcia Gulesian |
last post by:
How can I create a beep in javascript (I.E. 5.5 +) ?
|
by: mcbill20 |
last post by:
Hello all. I just installed Oracle 10g developer tools on a machine
running XP Pro and Office XP. Before this I had just the Oracle 9
client installed. I the previous configuration, I was able to...
|
by: senimu |
last post by:
Hi there,I'm trying to call from managed C++ code very simple API
functionBOOL Beep( DWORD dwFreq, DWORD dwDuration );Something like
this:namespace DocImage { public __gc class cBeep { ...
|
by: senimu |
last post by:
Hi there,
I'm trying to call very simple API function from managed C++ code
BOOL Beep( DWORD dwFreq, DWORD dwDuration );
Something like this:
namespace DocImage {
|
by: Rich |
last post by:
Hello,
I want to use the Beep() to alert users about certain
messages but in my workstation I can't get a sound out of
it. But Beep works in VB6. What do I need to do?
Sub...
....
Beep()...
|
by: pob |
last post by:
>From a form I have some code that calls 4 modules
frmMain
1 mod
2 mod
3 mod
4 mod
If mod 1 experiences an error the error handling works fine within mod
1 and writes out the error to a...
|
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?
...
|
by: =?Utf-8?B?UmFmYWVs?= |
last post by:
I'm studying C# (I've been a VB developer).
I'm making some tests and I need to use Console.Beep(), but it doesn't make
any sound, no matter if I try it in VS2008 beta or VS2005.
Could anybody...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |