现在的位置: 首页 > 综合 > 正文

C#使电脑发出嗡鸣声

2013年05月25日 ⁄ 综合 ⁄ 共 383字 ⁄ 字号 评论关闭

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace 鸣笛
{
    class Program
    {
       
        static void Main(string[] args)
        {
            
           BeepOn.Beep(500, 700);
            Console.ReadKey();

        }
       
    }

   public  class  BeepOn
 {
    [DllImport("Kernel32.dll")]
    public static extern bool Beep(int a, int b);
 }

}

抱歉!评论已关闭.