PDA

View Full Version : API SndPlaySound dar C# Mamnoon



SSP_Software_team
دوشنبه 12 آبان 1382, 19:45 عصر
سلام
میخواستم خواهش کنم طرز استفاده از تابع API SndPlaySound رو تو ‍‍‍#‍‍C بدونم ممنون :wink:

Vahid_Nasiri
دوشنبه 12 آبان 1382, 19:52 عصر
[DLLImport("winmm.dll")] public int sndPlaySound(string path, int flags) {}

const int SND_ASYNC = 0x1
const int SND_FILENAME = 0x20000

// And to play the sound:
sndPlaySound("C:\MySound.wav", SND_ASYNC | SND_FILENAME);

ثانیا این تابع بهتر است :
http://www.mentalis.org/apilist/PlaySound.shtml

SSP_Software_team
دوشنبه 12 آبان 1382, 20:03 عصر
ممنون خیلی لازمش داشتم