.Net WinForm System Beep on a 64 Bit OS

前端 未结 3 1844
花落未央
花落未央 2020-12-20 18:28

My application needs to beep when validation fails so the user (who may be several feet away) may hear it. I\'d like to use the Console.Beep() but this is unava

3条回答
  •  醉酒成梦
    2020-12-20 18:56

    You can use the Console.Beep() method described here: https://msdn.microsoft.com/en-us/library/8hftfeyw(v=vs.110).aspx

    Make sure that you run the executable as an administrator (escalated privileges)

提交回复
热议问题