
598
|
Chapter 13: The ‘My’ Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
• System.Media.SoundPlayer.Play Method
• System.Media.SoundPlayer.PlayLooping Method
• System.Media.SoundPlayer.PlaySyncMethod
See Also
Audio Object, PlaySystemSound Method, Stop Method
PlaySystemSound Method
Location
My.Computer.Audio.PlaySystemSound
Syntax
My.Computer.Audio.PlaySystemSound(systemSound)
systemSound (required; SystemSound enumeration)
The system sound to play. One of the following System.Media.SystemSounds
enumeration values.
Description
The PlaySystemSound method plays a system sound, one of the sounds linked to a
specific system-initiated action. The sound is played in the background one time.
Usage at a Glance
• This method is only valid in non-server applications.
• Specifying an invalid system sound will cause an exception.
Example
The following example plays the system “Beep” sound.
My.Computer.Audio.PlaySystemSound( _
System.Windows.Forms.SystemSounds.Beep)
Related Framework Entries
• Microsoft.VisualBasic.Devices.Audio.PlaySystemSound Method
• System.Media.SystemSound Class
• System.Media.SystemSound.Play Method
• System.Media.SystemSounds Class
Value Description
Asterisk
The sound played with an “asterisk” message box
Beep
The default system “beep” sound
Exclamation
The sound played with an “exclamation” message box
Hand
The sound played with ...