Intercepting Power Button (Suspend)
Posted on 2004-09-18
Does anyone know how to control or intercept the power button of the PDA from inside of software?
I am working on a .NET CF project right now, and I need to prevent the PDA from shuting down/suspending until I can do some exit porcessing. It looks like when the power button is hit it sends a vk_off message.
I'm working in C# in the .Net Compact Framework. From what I can figure out, it looks like I need to do it in the WinCE API. A P/Invoke or maybe a Keyboard hook proc are my current thoughts.
Thanks for any help and insight ...