PlaySystemSound 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.

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 a "hand" message box

Question

The sound played with a "question" message box


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

See Also

Audio Object, Play Method, Stop Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net