using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace dllimportTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern bool Beep(int frequency, int duration);
private void button1_Click(object sender, EventArgs e)
{
Beep(1000, 20);
}
}
}
DllImport("kernel32.dll")]bool Beep(int frequency, int duration);
最新推荐文章于 2022-10-28 22:55:58 发布