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);
}
}
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);
}
}