This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3464|Reply: 3

[Tips] .NET/C# console plays system tones

[Copy link]
Posted on 12/11/2023 8:18:25 PM | | |
Requirements: Use .NET/C# to write a console application to monitor product inventory, if there is a product in stock, it will remind me to buy, I used to use email notifications, now I want to notify in a different way,I was alerted by the Windows system's own tone

Using the following code is invalid under the console app, which is feasible in Windows Forms, and the code is as follows:


Reference:The hyperlink login is visible.

The console app can play a tone (for 3 seconds) using the Console.Beep method, and the code is as follows:


Reference:The hyperlink login is visible.





Previous:Discuz uses the Microsoft Clarity free website statistical analysis tool
Next:.NET/C# Console Command Line Tools (Parameters, Options)
Posted on 12/12/2023 2:16:52 PM |
There is a voice that can be played, and it supports Chinese
 Landlord| Posted on 12/12/2023 3:45:23 PM |
johnyoung Posted on 2023-12-12 14:16
There is a voice that can be played, and it supports Chinese

Code
Posted on 12/15/2023 5:33:24 PM |
Prompt:Authors are banned or removed content is automatically blocked
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com