Click here to Skip to main content
15,920,030 members
Home / Discussions / C#
   

C#

 
QuestionProblem with Paint Pin
naglbitur23-Nov-05 6:48
naglbitur23-Nov-05 6:48 
AnswerRe: Problem with Paint Pin
Stanciu Vlad23-Nov-05 6:57
Stanciu Vlad23-Nov-05 6:57 
QuestionListview drag drop and Ghost icon issue Pin
sameerhanda23-Nov-05 4:09
sameerhanda23-Nov-05 4:09 
AnswerRe: Listview drag drop and Ghost icon issue Pin
Curtis Schlak.23-Nov-05 12:12
Curtis Schlak.23-Nov-05 12:12 
QuestionPlease help with problem – multiple audio file playback(c#) Pin
truly_pringled23-Nov-05 4:03
truly_pringled23-Nov-05 4:03 
GeneralRe: Please help with problem – multiple audio file playback(c#) Pin
mav.northwind23-Nov-05 4:25
mav.northwind23-Nov-05 4:25 
QuestionRe: Please help with problem – multiple audio file playback(c#) Pin
truly_pringled23-Nov-05 5:32
truly_pringled23-Nov-05 5:32 
AnswerRe: Please help with problem – multiple audio file playback(c#) Pin
Dave Kreskowiak23-Nov-05 5:44
mveDave Kreskowiak23-Nov-05 5:44 
First, you've got the signature wrong. It's:
[DllImport("winmm.dll", SetLastError=true)]
static extern bool PlaySound(string pszSound, System.UIntPtr hmod, uint fdwSound);

your trying to pass two long's (64-bit values!) in where the function is looking for two 32-bit numbers.

Second, you don't need to launch another thread to play the sound. Starting a thread is a VERY expensive process, taking forever and a day to start one. If you look at the docs for PlaySound on MSDN or PInvoke.net[^], you'll see that if you pass in the fdwSound parameter with the value 1, the function will start playing the sound asychronously, meaning it plays the sound without your code waiting for it to complete.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

AnswerRe: Please help with problem – multiple audio file playback(c#) Pin
truly_pringled24-Nov-05 3:48
truly_pringled24-Nov-05 3:48 
QuestionSystem.Resources.MissingManifestResourceException Pin
Dan Neely23-Nov-05 3:50
Dan Neely23-Nov-05 3:50 
AnswerRe: System.Resources.MissingManifestResourceException Pin
Dan Neely23-Nov-05 5:32
Dan Neely23-Nov-05 5:32 
QuestionConditional Installation of merge module? Pin
mav.northwind23-Nov-05 3:38
mav.northwind23-Nov-05 3:38 
Questionuser interface standards Pin
rmedo23-Nov-05 3:03
rmedo23-Nov-05 3:03 
AnswerRe: user interface standards Pin
Dan Neely23-Nov-05 4:23
Dan Neely23-Nov-05 4:23 
AnswerRe: user interface standards Pin
Not Active23-Nov-05 5:54
mentorNot Active23-Nov-05 5:54 
QuestionUI control hot key (Alt+?) Pin
smurfy3423-Nov-05 2:56
smurfy3423-Nov-05 2:56 
AnswerRe: UI control hot key (Alt+?) Pin
Dan Neely23-Nov-05 3:56
Dan Neely23-Nov-05 3:56 
GeneralRe: UI control hot key (Alt+?) Pin
smurfy3423-Nov-05 4:16
smurfy3423-Nov-05 4:16 
AnswerRe: UI control hot key (Alt+?) Pin
Dr. Spack23-Nov-05 9:40
Dr. Spack23-Nov-05 9:40 
GeneralRe: UI control hot key (Alt+?) Pin
Dr. Spack23-Nov-05 9:45
Dr. Spack23-Nov-05 9:45 
QuestionXML WYSIWYG Pin
Gktony23-Nov-05 1:33
Gktony23-Nov-05 1:33 
Questionvb to C#.Net Pin
Ankit Aneja23-Nov-05 0:45
Ankit Aneja23-Nov-05 0:45 
AnswerRe: vb to C#.Net Pin
User 665823-Nov-05 1:41
User 665823-Nov-05 1:41 
GeneralRe: vb to C#.Net Pin
Ankit Aneja23-Nov-05 1:52
Ankit Aneja23-Nov-05 1:52 
AnswerRe: vb to C#.Net Pin
anandss23-Nov-05 9:03
anandss23-Nov-05 9:03 

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.