Interaction.Beep Method ()


Sounds a tone through the computer's speaker.

Namespace:   Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

Public Shared Sub Beep

The pitch and duration of the beep depend on your hardware and system software and therefore vary among computers.


The Beep function requires UIPermission at the SafeTopLevelWindows level, which may affect its execution in partial-trust situations. For more information, see UIPermission.

This example uses the Beep function to sound a tone through the computer's speaker.

' Sound a tone.

.NET Framework
Available since 1.1
Return to top