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; //发生频率(Hz)
int b=1000; //持续时间(毫秒)
Beep(a,b);
}
}
发表于 @ 2007年11月07日 16:15:00|评论(loading...)|编辑