蜂鸣在WinCE的,这可能吗? [英] beep in WinCE , it possible ?
本文介绍了蜂鸣在WinCE的,这可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是有可能使蜂鸣声在WinCE的?
is it possible to make beep in WinCE ?
我尝试,我得到一个错误
i try and i get an error
推荐答案
有关beeing .NET框架的方法不在框架的CF版本。得到蜂鸣声的最好的办法是的PInvoke进入的MessageBeep函数。此方法的PInvoke的签名是pretty直线前进
The .net framework methods for beeing are not available in the CF version of the framework. The best way to get a beep sound is to PInvoke into the MessageBeep function. The PInvoke signature for this method is pretty straight forward
[DllImport("CoreDll.dll")]
public static extern void MessageBeep(int code);
public static void MessageBeep() {
MessageBeep(-1); // Default beep code is -1
}
本博客文章有极好的更深入的例子:的 http://blog.digitforge.com/?p=4(上archive.org)
This blog post has an excellent more thorough example: http://blog.digitforge.com/?p=4 (on archive.org)
这篇关于蜂鸣在WinCE的,这可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文