0

A project I am working on requires that the computer make a sound.

This is a service written in VB.NET. Due to the location and circumstances of where this computer will be in use, e-mail or other notifications won't work in the case of something going wrong (the computer won't be on a network).

The service needs a way to alert people that something is wrong, so sound seemed like the logical choice.

A call to System.Console.Beep does not work when the program is running as a service. I also found this article that looks like the same problem I am having, but the link it contains on how to use something called "IOCTL_BEEP_SET" is broken, and quite a bit of Googleing has failed to yield any answers.

Does anyone out there know how to make a Windows Service (written in VB.NET) Beep? Or, know of a way for a computer to get someones attention other than sound? (system would be not logged in, and screen would likely be turned off, and is not on a network)

Thanks

Community
  • 1
  • 1
Maculin
  • 61
  • 8
  • 2
    Wire a siren in to a com port. Better still add a bit of hardware so it will howl if there's no signal. If you are going to go this far, might as well do the job properly. – Tony Hopkinson Nov 23 '12 at 14:14

2 Answers2

0

I think your service no interact with desktop.goto service property and set manually it. enter image description here

Try it :)

Then Try

Console.Beep();
Elshan
  • 7,339
  • 4
  • 71
  • 106
0

accidently my pc work that. i am using windows 7 ultimate.but it interactive another desktop. check this out

http://www.brianbondy.com/blog/id/100/understanding-windows-at-a-deeper-level-sessions-window-stations-and-desktops

http://msdn.microsoft.com/en-us/library/windows/desktop/ms687105(v=vs.85).aspx

Elshan
  • 7,339
  • 4
  • 71
  • 106