How to: Play a Beep from a Windows Form
This example plays a beep at run time.
Example
Public Sub OnePing()
Beep()
End Sub
public void onePing()
{
SystemSounds.Beep.Play();
}
Note
The sound played in the C# code sample is determined by the Beep system sound setting. For more information, see SystemSounds.
Compiling the Code
For C#, this example requires a reference to the System.Media namespace.
See also
Sadarbojieties ar mums vietnē GitHub
Šī satura avotu var atrast vietnē GitHub, kur varat arī izveidot un pārskatīt problēmas un atgādāšanas pieprasījumus. Lai iegūtu papildinformāciju, skatiet mūsu līdzstrādnieku rokasgrāmatu.
.NET Desktop feedback
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par