Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beep function in VB6. What "beeps"?

Tags:

vb6

hardware

VB6 has a Beep function. I am curious to know what exactly beeps when this function is called. Thanks.

like image 364
CodeBlue Avatar asked Apr 23 '12 15:04

CodeBlue


People also ask

What is the function of the beep?

The Beep function in C is used to make a Beep sound. It generates a tone on the speaker. The function is synchronous, i.e. it waits and doesn't return to its caller function until the sound is finished. It can be very useful during the Debugging process for finding errors.

What is the function of beep command in Visual Basic program?

Sounds a tone through the computer's speaker.


2 Answers

If the motherboard has a speaker built-in (either a small tweeter speaker in ancient motherboards or an even smaller beep speaker in not-so-ancient motherboards), then that's what beeps. In Windows Vista the Beep function was no longer supported, however In Windows 7 the Beep function was resurrected and is routed through the computer's sound device.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms679277(v=vs.85).aspx

like image 25
MCattle Avatar answered Sep 28 '22 18:09

MCattle


To be more accurate VB6 has a Beep subroutine, not a function.

This isn't related to the Kernel32 Beep entrypoint at all, and works just as well in Vista as in Windows 7, XP, or Windows 95.

It plays the "Default Beep" sound from the user's Windows sound scheme. If the system has no sound card it should beep via the motherboard speaker the same way this sound is played for anything else in Windows that invokes it.

It is just a generic audible alert. It probably was only included for use by old, old MS Basic programs being ported forward into VB.

like image 157
Bob77 Avatar answered Sep 28 '22 18:09

Bob77