Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
This example plays a beep at run time.
Example
Public Sub OnePing()
Beep()
End Sub
public void onePing()
{
SystemSounds.Beep.Play();
}
Visual C# Note |
|---|
The sound played in the C# code sample is determined by the Beep system sound setting. For more information, see SystemSounds. |
Compiling the Code
This example requires:
(Visual Basic) A reference to the Microsoft.VisualBasic namespace.
(C#) A reference to the System.Media namespace.
See Also
Tasks
How to: Play a System Sound from a Windows Form
How to: Play a Sound from a Windows Form
Visual C# Note