C#使电脑发出嗡鸣声

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

}

posted @ 2012-06-28 17:43  MXi4oyu  阅读(361)  评论(0编辑  收藏  举报