日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

c#中用声音提示报警(转)

發布時間:2023/12/18 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c#中用声音提示报警(转) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

using System;?
using System.Runtime.InteropServices;?
調用?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);c#中用聲音提示報警

轉載于:https://www.cnblogs.com/qiaoheng/archive/2012/05/10/2493777.html

總結

以上是生活随笔為你收集整理的c#中用声音提示报警(转)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。