Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
You can use the SoundPlayer class to play a sound from an embedded resource.
Example
Compiling the Code
This example requires:
Importing the System.Media namespace.
Including the sound file as an embedded resource in your project.
Replacing "<AssemblyName>" with the name of the assembly in which the sound file is embedded. Do not include the ".dll" suffix.
See Also
Tasks
How to: Play a Sound from a Windows Form
How to: Loop a Sound Playing on a Windows Form