I am creating a quiz and I wish to make the Internal speaker bleep when a button is pressed. Is there any way that I can do this?
Printable View
I am creating a quiz and I wish to make the Internal speaker bleep when a button is pressed. Is there any way that I can do this?
Use the Beep command.
Yeah, the beep command works ok, but if you have a soundcard it will make the beep out of your external speakers.
Add a module and paste the following into it:
Public Declare Function MessageBeep Lib "user32" (ByVal wType As Long) As Long
Now call the beep with the following (from a button or something):
MessageBeep -1
The -1 value makes the internal speaker beep, whilst a +1 value (or just 1) makes the beep through a soundcard if you have one.
Is there anyone who know how to beep with different frequencies?
You mean like the QB play function?
Yeah, or more like the QB sound. Cool thing really :)
http://forums.vb-world.net/showthread.php?threadid=5405
http://www.vbcode.com/asp/showsn.asp?theID=929
[Edited by Juan Carlos Rey on 03-31-2000 at 10:28 PM]
As you may have guessed I am very new at VB programming!
What is the Beep command and where do I insert it????
OH! We didn't tell you that, Insert it in the command button click event
Thank U all very much! There is one other thing though....
Is there any way that I can produce different frequencies? can I have the whole code for this please? Is there also any way that I can string together a kind of melody using the internal speaker to mark the end of the quiz?
Thank U all very much! There is one other thing though....
Is there any way that I can produce different frequencies? can I have the whole code for this please? Is there also any way that I can string together a kind of melody using the internal speaker to mark the end of the quiz?