|
|
Title | Play the system sounds in Visual Basic 2008 |
Description | This example shows how to play the system sounds in Visual Basic 2008. |
Keywords | Visual Basic 2008, VB 2008, sound, system sounds, System.Media.SystemSounds, SystemSounds |
Categories | Multimedia, VB.NET |
|
|
This program simply uses the System.Media.SystemSounds namespace to play the system sounds.
|
|
Public Class Form1
Private Sub btnAsterisk_Click() Handles _
btnAsterisk.Click
System.Media.SystemSounds.Asterisk.Play()
End Sub
Private Sub btnBeep_Click() Handles btnBeep.Click
System.Media.SystemSounds.Beep.Play()
End Sub
Private Sub btnExclamation_Click() Handles _
btnExclamation.Click
System.Media.SystemSounds.Exclamation.Play()
End Sub
Private Sub btnHand_Click() Handles btnHand.Click
System.Media.SystemSounds.Hand.Play()
End Sub
Private Sub btnQuestion_Click() Handles _
btnQuestion.Click
System.Media.SystemSounds.Question.Play()
End Sub
End Class
|
|
|
|
|
|