Using the following code even if your speakers are switched off you can still make a beep sound.

Code:
 Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As _
           Integer, ByVal dwDuration As Integer) As Integer
'event
Beep(500, 500)'plays a beep at 500 frequency and 500milliseconds
Computer's internal speaker volume and frequency threshold varies from computer to computer so you will not be able to play all freuqencies.
Setting the frequency between 13000 and 16500 will make the hight pitched "mosquito" noise which most adults can't hear and will hurt your ears if you have good hearing.