Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: ToolBar.BackColor Pin
Heath Stewart6-May-04 11:51
protectorHeath Stewart6-May-04 11:51 
QuestionAcitveX equivalent in C# ? Pin
TigerNinja_6-May-04 8:35
TigerNinja_6-May-04 8:35 
AnswerRe: AcitveX equivalent in C# ? Pin
Heath Stewart6-May-04 8:40
protectorHeath Stewart6-May-04 8:40 
GeneralRe: AcitveX equivalent in C# ? Pin
TigerNinja_6-May-04 10:08
TigerNinja_6-May-04 10:08 
GeneralRe: AcitveX equivalent in C# ? Pin
Heath Stewart6-May-04 10:26
protectorHeath Stewart6-May-04 10:26 
AnswerRe: AcitveX equivalent in C# ? Pin
TigerNinja_6-May-04 9:09
TigerNinja_6-May-04 9:09 
GeneralSound- Two Events at a time Pin
MeterMan6-May-04 8:14
MeterMan6-May-04 8:14 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 8:29
protectorHeath Stewart6-May-04 8:29 
First, why are you using MP3s? For long-playing sounds like background music or something, it's fine; but, you need something quick to play, which is why WAVs are pretty common. Just look at the sound events for Windows (although that goes back a long time when WAVs were about the only sound files that existed).

Second, the KeyDown event is fired in the same thread that the control was created in (the UI thread), so if you started your background in the same thread, this may be the cause.

Finally, why not use Managed DirectX 9 instead of inteorp'ing with the ActiveX DLLs? There's a lot better support for managed code and it's not simply interop assemblies - it was written from the ground-up for managed applications. You could use DirectSound for your background sound while playing other sounds asynchronously.

You should try it. Download the Summer 2003 update (it's the full package) from http://msdn.microsoft.com/directx[^].

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 12:15
MeterMan6-May-04 12:15 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 17:53
protectorHeath Stewart6-May-04 17:53 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 17:58
MeterMan6-May-04 17:58 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 18:01
protectorHeath Stewart6-May-04 18:01 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 13:25
MeterMan6-May-04 13:25 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart6-May-04 17:57
protectorHeath Stewart6-May-04 17:57 
GeneralRe: Sound- Two Events at a time Pin
MeterMan6-May-04 19:46
MeterMan6-May-04 19:46 
GeneralRe: Sound- Two Events at a time Pin
Heath Stewart7-May-04 3:08
protectorHeath Stewart7-May-04 3:08 
GeneralDiffgram Updates Pin
MrJJKoolJ6-May-04 7:31
MrJJKoolJ6-May-04 7:31 
GeneralRe: Diffgram Updates Pin
Mazdak6-May-04 7:45
Mazdak6-May-04 7:45 
GeneralRe: Diffgram Updates Pin
MrJJKoolJ6-May-04 8:30
MrJJKoolJ6-May-04 8:30 
GeneralRe: Diffgram Updates Pin
Mazdak6-May-04 8:36
Mazdak6-May-04 8:36 
Generalphp request Pin
Alex Getman6-May-04 6:09
Alex Getman6-May-04 6:09 
GeneralRe: php request Pin
Heath Stewart6-May-04 8:02
protectorHeath Stewart6-May-04 8:02 
GeneralRe: php request Pin
leppie6-May-04 9:13
leppie6-May-04 9:13 
GeneralRe: php request Pin
Alex Getman6-May-04 10:15
Alex Getman6-May-04 10:15 
GeneralRe: php request Pin
Heath Stewart6-May-04 10:24
protectorHeath Stewart6-May-04 10:24 

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.