随笔-86  评论-423  文章-13  trackbacks-0

C#报警操作(发出声音——bee~~~~)有用的小程序哦!

using  System;  
using  System.Runtime.InteropServices;  
class  test  
{  
           [DllImport("kernel32.dll")]  
           private  static  extern  int  Beep(int  dwFreq  ,int  dwDuration)  ;  
 
           public  static  void  Main()  
           {  
                       int  a=0X7FF;  
                       int  b=1000;  
                       Beep(a,b);  
                   }  
}  
涉及到API查询的可以参考我兄弟的文章
http://www.cnblogs.com/maxwolf/archive/2005/07/26/200741.html
posted on 2005-07-28 18:15 秋雨飘飞 阅读(2145) 评论(3) 编辑 收藏