在C#中的任何调用都像VB.Net中的Beep一样 [英] Any call in C# like Beep in VB.Net

查看:73
本文介绍了在C#中的任何调用都像VB.Net中的Beep一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


有没有人知道是否可以在C#中为系统扬声器调用一个Beep,如

那个在VB中但不同于

Microsoft.VisualBasic.Interaction.Beep()


谢谢

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

推荐答案

你好可以PInvoke PlaySound并发出哔声波文件。然而,互动

是针对这样的情况而做的,你不会因为使用它而失去任何东西。

它所做的一切就是将API包装起来有人告诉过。


HTH,


比尔

" Evgeny Zoldin" < EZ ***** @ hotmail.com>在消息中写道

news:uO ************** @ tk2msftngp13.phx.gbl ...
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...
大家好,

是否有人知道在C#中可以为系统扬声器调用一个Beep,如VB中的那个但不同于Microsoft.VisualBasic.Interaction.Beep()

谢谢
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



你可以PInvoke PlaySound并发出哔声波文件。然而,互动

是针对这样的情况而做的,你不会因为使用它而失去任何东西。

它所做的一切就是将API包装起来有人告诉过。


HTH,


比尔

" Evgeny Zoldin" < EZ ***** @ hotmail.com>在消息中写道

news:uO ************** @ tk2msftngp13.phx.gbl ...
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...
大家好,

是否有人知道在C#中可以为系统扬声器调用一个Beep,如VB中的那个但不同于Microsoft.VisualBasic.Interaction.Beep()

谢谢
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



您可以添加对Microsoft Visual Basic .NET Runtime的引用,并且具有

代码如:

Microsoft.VisualBasic.Interaction.Beep();

" Evgeny Zoldin" < EZ ***** @ hotmail.com>在消息中写道

news:uO ************** @ tk2msftngp13.phx.gbl ...
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...
大家好,

是否有人知道在C#中可以为系统扬声器调用一个Beep,如VB中的那个但不同于Microsoft.VisualBasic.Interaction.Beep()

谢谢
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



这篇关于在C#中的任何调用都像VB.Net中的Beep一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆