|
-
May 19th, 2002, 06:54 PM
#1
Thread Starter
Lively Member
making a computer beep
how can you make a computer beep?
-
May 19th, 2002, 07:00 PM
#2
Fanatic Member
-
May 19th, 2002, 07:57 PM
#3
You have a choice between using the VB built in function Beep that will beep through your soundcard (if you have one) or use the API Beep function that will send the signal through the computer speaker, no matter if you have a sound card or not (or if you have a speaker connected to your sound card).
-
May 19th, 2002, 08:17 PM
#4
PowerPoster
I liked the ol' QBasic Beep - where you could give it duration, and frequency, and iterations or something.
Making multiple beeps in VB6 is a pain in the arse...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
May 20th, 2002, 06:28 AM
#5
Originally posted by rjlohan
I liked the ol' QBasic Beep - where you could give it duration, and frequency, and iterations or something.
Making multiple beeps in VB6 is a pain in the arse...
The API function will allow you to do so.
VB Code:
Private Declare Function BeepAPI _
Lib "kernel32" Alias "Beep" ( _
ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long
Best regards
-
May 20th, 2002, 05:31 PM
#6
PowerPoster
Groovy baby, yeah!
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
May 20th, 2002, 05:44 PM
#7
Frenzied Member
The beep API has absolutely no effect when i run it. I don't seem to know why. I want to make beep songs like in qbasic...
You just proved that sig advertisements work.
-
May 20th, 2002, 05:51 PM
#8
Originally posted by nishantp
The beep API has absolutely no effect when i run it. I don't seem to know why. I want to make beep songs like in qbasic...
The dwFreq and dwDuration arguments are ignored on Win9x based systems I'm affraid.
With systems with a sound card this function will play the default system beep on Win9x.
-
May 20th, 2002, 05:53 PM
#9
Frenzied Member
I'm running XP, which is NT based...I don't understand why it doesnt work. Is there a volume setting for the computer speaker?
You just proved that sig advertisements work.
-
May 20th, 2002, 05:57 PM
#10
Originally posted by nishantp
I'm running XP, which is NT based...I don't understand why it doesnt work. Is there a volume setting for the computer speaker?
I tried the following code on my XP computer without problems:
VB Code:
Private Declare Function BeepAPI _
Lib "kernel32" Alias "Beep" ( _
ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long
Private Sub Command1_Click()
BeepAPI 200, 1000
End Sub
-
May 20th, 2002, 06:01 PM
#11
Frenzied Member
I just tried that and some variations. It seems theres something physically wrong with by speaker. Thanks anyways.
You just proved that sig advertisements work.
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
|