Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitlePlay the system sounds in Visual Basic 2008
DescriptionThis example shows how to play the system sounds in Visual Basic 2008.
KeywordsVisual Basic 2008, VB 2008, sound, system sounds, System.Media.SystemSounds, SystemSounds
CategoriesMultimedia, 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
 
 
Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated