spandex44
Jan 23rd, 2000, 01:09 AM
Hello,
I've got two questions. First of all, in my program, when you press a command button, a loop is started. Whenever you press it again, it restarts the loop. The program involves movement with the arrow buttons, rather than the mouse, so the next time the user presses the Space bar, the command button is activated, because it remained activated from the previous click. Wooh, that was a run on sentence!
Second question:
This is the code I'm using to play WAV files:
Declarations:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
Code:
SoundFile$ = "d:\tank\boomhit.wav"
wFlags% = SND_ASYNC Or SND_NODEFAULT
x% = sndPlaySound(SoundFile$, wFlags%)
Whenever I try to play two sounds at once, one sound stops, while the other one plays. How can I make both play at the same time? Thanks.
------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com
I've got two questions. First of all, in my program, when you press a command button, a loop is started. Whenever you press it again, it restarts the loop. The program involves movement with the arrow buttons, rather than the mouse, so the next time the user presses the Space bar, the command button is activated, because it remained activated from the previous click. Wooh, that was a run on sentence!
Second question:
This is the code I'm using to play WAV files:
Declarations:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
Code:
SoundFile$ = "d:\tank\boomhit.wav"
wFlags% = SND_ASYNC Or SND_NODEFAULT
x% = sndPlaySound(SoundFile$, wFlags%)
Whenever I try to play two sounds at once, one sound stops, while the other one plays. How can I make both play at the same time? Thanks.
------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com