Click here to Skip to main content
15,908,841 members
Home / Discussions / C#
   

C#

 
GeneralRe: audio Pin
treah13-Jun-07 23:08
treah13-Jun-07 23:08 
GeneralRe: audio [modified] Pin
Luc Pattyn14-Jun-07 1:04
sitebuilderLuc Pattyn14-Jun-07 1:04 
Hi,

you can play a sound file using P/Invoke:

public static void PlaySoundFile(string fileSpec) {
    int res=PlaySound(fileSpec, 0, 0);
    if (res==0) log("Failed to play sound "+fileSpec);
}

[DllImport("Winmm.dll", CharSet=CharSet.Ansi,
     CallingConvention=CallingConvention.Cdecl)]
static extern int PlaySound(string filespec, int hModule, int dwFlags);



Smile | :)




-- modified at 7:20 Thursday 14th June, 2007


GeneralRe: audio Pin
blackjack215014-Jun-07 1:50
blackjack215014-Jun-07 1:50 
QuestionHow can I format datagridview with formular as Excel Pin
boardpin13-Jun-07 21:44
boardpin13-Jun-07 21:44 
QuestionMicrophone input Pin
Guybrush8613-Jun-07 21:42
Guybrush8613-Jun-07 21:42 
AnswerRe: Microphone input Pin
Russell'14-Jun-07 2:01
Russell'14-Jun-07 2:01 
GeneralRe: Microphone input Pin
Guybrush8614-Jun-07 6:52
Guybrush8614-Jun-07 6:52 
AnswerRe: Microphone input Pin
mav.northwind14-Jun-07 10:26
mav.northwind14-Jun-07 10:26 
QuestionWhat is the alternative of friend functions in c# Pin
FishiFishi13-Jun-07 21:10
FishiFishi13-Jun-07 21:10 
AnswerRe: What is the alternative of friend functions in c# Pin
Martin#13-Jun-07 21:23
Martin#13-Jun-07 21:23 
GeneralRe: What is the alternative of friend functions in c# Pin
FishiFishi13-Jun-07 21:40
FishiFishi13-Jun-07 21:40 
GeneralRe: What is the alternative of friend functions in c# Pin
Russell Jones13-Jun-07 21:44
Russell Jones13-Jun-07 21:44 
AnswerRe: What is the alternative of friend functions in c# Pin
Russell Jones13-Jun-07 21:35
Russell Jones13-Jun-07 21:35 
AnswerRe: What is the alternative of friend functions in c# Pin
blackjack215013-Jun-07 22:31
blackjack215013-Jun-07 22:31 
QuestionInterface- Confusion Pin
Rahul8313-Jun-07 20:57
Rahul8313-Jun-07 20:57 
AnswerRe: Interface- Confusion Pin
Martin#13-Jun-07 21:26
Martin#13-Jun-07 21:26 
GeneralRe: Interface- Confusion Pin
Rahul8314-Jun-07 0:30
Rahul8314-Jun-07 0:30 
QuestionClient area of windows Form Pin
Maddie from Dartford13-Jun-07 20:42
Maddie from Dartford13-Jun-07 20:42 
AnswerRe: Client area of windows Form Pin
JoeSharp13-Jun-07 22:09
JoeSharp13-Jun-07 22:09 
GeneralRe: Client area of windows Form Pin
Maddie from Dartford13-Jun-07 22:21
Maddie from Dartford13-Jun-07 22:21 
GeneralRe: Client area of windows Form Pin
JoeSharp13-Jun-07 22:47
JoeSharp13-Jun-07 22:47 
Question.net 2.0 code based on dates Pin
kathikeya13-Jun-07 20:39
kathikeya13-Jun-07 20:39 
AnswerRe: .net 2.0 code based on dates Pin
Sathesh Sakthivel13-Jun-07 20:45
Sathesh Sakthivel13-Jun-07 20:45 
QuestionUsage of ? and [Test Method] Pin
M. J. Jaya Chitra13-Jun-07 20:23
M. J. Jaya Chitra13-Jun-07 20:23 
AnswerRe: Usage of ? and [Test Method] Pin
Niiiissssshhhhhuuuuu13-Jun-07 20:31
Niiiissssshhhhhuuuuu13-Jun-07 20:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.