首页 > 代码库 > WinCE平台的C#程序中调用MessageBeep发出一些系统自带的声音,而不用使用playsound

WinCE平台的C#程序中调用MessageBeep发出一些系统自带的声音,而不用使用playsound



        [DllImport("coredll.dll", EntryPoint = "MessageBeep")]
        public static extern bool MessageBeep(int iType);


            int i = 0x00000040;
            ClassPublicFunction.MessageBeep(i);




声音的类型

public enum BeepType

{

  SimpleBeep = -1,

  IconAsterisk = 0x00000040,

  IconExclamation = 0x00000030,

  IconHand = 0x00000010,

  IconQuestion = 0x00000020,

  Ok = 0x00000000,

}