我写了一个
/// <summary>
/// APIFunctions 包含系统中对API的调用的类
/// </summary>
//public class APIFunctions
//{
// /// <summary>
// /// PCI喇叭的频率
// /// </summary>
// public const int FREQ = 2000;
// /// <summary>
// /// PCI喇叭的持续时间
// /// </summary>
// public const int DURATION = 1000; // [DllImport("kernel32.dll", EntryPoint = "Beep")]
// public static extern int Beep(int dwFreq, int dwDuration); // /// <summary>
// /// 通过此方法发出声音通知用户
// /// </summary>
// public static void CollateBeep()
// {
// Beep(FREQ, DURATION);
// }
//}
这个是服务器端发出的警报声, 我现在想客户在浏览的时候从客户端发出警报
/// <summary>
/// APIFunctions 包含系统中对API的调用的类
/// </summary>
//public class APIFunctions
//{
// /// <summary>
// /// PCI喇叭的频率
// /// </summary>
// public const int FREQ = 2000;
// /// <summary>
// /// PCI喇叭的持续时间
// /// </summary>
// public const int DURATION = 1000; // [DllImport("kernel32.dll", EntryPoint = "Beep")]
// public static extern int Beep(int dwFreq, int dwDuration); // /// <summary>
// /// 通过此方法发出声音通知用户
// /// </summary>
// public static void CollateBeep()
// {
// Beep(FREQ, DURATION);
// }
//}
这个是服务器端发出的警报声, 我现在想客户在浏览的时候从客户端发出警报
解决方案 »
- c# 请教json字符串转为对象
- MSXML2.XMLHTTP xmlhttp = new MSXML2.XMLHTTPClass();
- 语法错误 (操作符丢失) 在查询表达式 ''计科0501 ','1-2节','无'' 中。
- 请高手帮忙改写 Jillzhang.GifUtility 水印组件。
- rdlc报表如何在程序中设置纵向打印
- wpf实现类似进度条的东西
- 我在用c#编写外部存储过程,如何可以引用到System.Web.Caching下的Cache?
- 怎样调用其他窗体的控件
- 请教一个 .Net安装问题。
- C#编好的程序不能在非.net平台上运行?郁闷着!
- c# serialPort类Write()及WriteLine()方法写入数据失败
- 多线程 界面卡死
if (textBox2.Text.Trim().Contains("On-Line"))
{
Label1.Text = "正常供电!"; APIFunctions.CollateBeep();
}
是一个页面的调用, 可是调用的这个方法只会是服务器端发出声音,,, 我现在是想让客户端能够听到声音,,这样写可以么: Response.Write("<embed src='sound/KnowingMeKnowingYou.mid' hidden='true'/>");
直接使用 Console.Beep