0

I want to play a beep in my windows service in especial situation but I cannot. I try several methods like : Kernel32, System.Media.SystemSounds.Beep.Play() and Console.Beep(), Console.WriteLine(@"\a"). But none of them was useful. So what can I do to solve my problem?

Masi
  • 1
  • 1
  • 2
    Are you talking about making the PC speaker beep like what happens when you reboot the computer? – Scott Chamberlain May 26 '20 at 06:38
  • 1
    Did you try to `Beep()` in regular application? – aepot May 26 '20 at 06:50
  • See https://stackoverflow.com/q/1286194/21567. Note that the link in the answer is dead, but might still give a hint. – Christian.K May 26 '20 at 07:01
  • 1
    One of the main points of services is that they can run all the time the machine is running, even if *no one* is logged in. So you may be able to make a beep, but it's possible that nobody hears it. What are the consequences then? – Damien_The_Unbeliever May 26 '20 at 07:26

0 Answers0