using System.Collections.Generic
using System.ComponentModel
using System.Data
using System.Drawing
using System.Linq
using System.Text
using System.Windows.Forms
using System.Runtime.InteropServices
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent()
}
[DllImport("kernel32.dll")]
private static extern int Beep(int dwFreq, int dwDuration)
private void button1_Click(object sender, EventArgs e)
{
Beep(0X7FF, 1000)
}
}
}
.版本 2.DLL命令 Beep, 逻辑型, , "Beep"
.参数 dwFreq
.参数 dwDuration
参数1 为声音 1-999 之间
参数2 为播放速度 1-99
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)