国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

C#調用聲音函數(PlaySound,Beep,MessageBeep等)

2024-07-21 02:26:37
字體:
來源:轉載
供稿:網友


<一>visual basic beep()

1.使用visual basic beep函數;添加引用 miscorsoft visual basic runtime

 

2.調用 interaction.beep();

<二>使用messagebeep(unit utype):需添加 using system.runtime.interopservices;

public const int mb_iconexclamation =  48;

  [dllimport("user32.dll")]
  public static extern bool messagebeep(uint utype);

messagebeep( mb_iconexclamation );

<三>調用beep(int freq,int duration)函數

  [dllimport("kernel32.dll")]
  public static extern bool beep(int freq,int duration);

beep(800,300);

<四>調用playsound(string pszsound,int hmod,int fdwsound)
  [dllimport("winmm.dll")]
  public static extern bool playsound(string pszsound,int hmod,int fdwsound);
  public const int snd_filename = 0x00020000;
  public const int snd_async = 0x0001;

playsound("提示時奏幻想空間.wav",0,snd_async|snd_filename);

 


 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 郧西县| 南川市| 寻乌县| 临漳县| 扶余县| 南京市| 祥云县| 大安市| 乐昌市| 炉霍县| 海南省| 萍乡市| 易门县| 夏邑县| 金寨县| 承德县| 鹤山市| 米脂县| 奉化市| 普安县| 定远县| 类乌齐县| 昆明市| 绥滨县| 鄄城县| 广汉市| 广南县| 宜城市| 宜都市| 萝北县| 临沧市| 青阳县| 柏乡县| 耒阳市| 开原市| 平南县| 永昌县| 大足县| 醴陵市| 准格尔旗| 枣庄市|