Provides methods for playing sounds.
The following table lists examples of tasks involving the My.Computer.Audio object.
Play a sound in the background.
Play a sound once and wait for completion.
Play a sound many times.
Stop a sound playing in the background.
The My.Computer.Audio.Play method plays the specified sound in the background when AudioPlayMode.Background is specified.
This code can run only within a Windows Forms application.
The file name should reference a .wav sound file on your system.
To simplify the management of your sound files, consider storing the files as application resources. The files can then be accessed through the My.Resources Object.
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Windows Control Library
Web Control Library