|
-
Jun 26th, 2000, 10:11 PM
#1
Thread Starter
_______
I play a wav file but it seems it has to finish before
anything can get in
I want to be able to unload if esc is pressed but
this function won't let go until it has finished.
How can I interrupt it and have it quit
Call sndPlaySound(ByVal App.Path & "\sitting.wav", SND_SYNC)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 26th, 2000, 10:58 PM
#2
Addicted Member
Visual Basic 6 Enterprise Edition + SP4
-
Jun 26th, 2000, 10:59 PM
#3
Use SND_ASYNC as the flag. For this, you need to declare the const in your module.
Code:
Public Const SND_ASYNC = &H1
Then you would use this to play your WAV.
Code:
Call sndPlaySound(ByVal App.Path & "\sitting.wav", SND_SYNC)
-
Jun 26th, 2000, 11:28 PM
#4
Thread Starter
_______
nope...let me try to explain this in a better way...
megatron:
I have the declares in place
If I do it your way it's the same.
What I need to do is stop it from playing
when I hit the esc key.
If i do it async it just skips through the nag screen
and flips into the image projector but still finishes
playing the song.
I am just trying to bypass the nag screen if esc is pressed.
I can set the ctlt to a button and have it bypassed on startup like the windows click if you want to see this
screen on startup but I was trying to just use the esc
key to do it.
code in form activate
Call sndPlaySound(ByVal App.Path & "\sitting.wav", SND_ASYNC)
Timer1.Enabled = False
Unload Me
Load frmPicDisplay
frmPicDisplay.Show
'esc key codePrivate Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If (KeyCode = 27) Then
Unload Me
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 27th, 2000, 12:36 AM
#5
Call sndPlaySound with vbNullString for lpszSound to stop the current sound.
-
Jun 27th, 2000, 01:56 AM
#6
Thread Starter
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|