Has anyone successfully trapped the power/standby button on a WM5 device such that your code prevented users "switching off" even the screen?
I have an application that uses the screen in a landscape orientation and I'd like to trap the power key press so that (a) users can hold the device with both hands and not accidentally power-down the screen and (as a bonus - b) use it as a UI button.
Perhaps someone has a low level hack? I'm using WM5 as delivered on iPaq RX1950(s).
Remember, there is no such thing as impossible - especially with WM5. If I answer it myself in the meantime, I'll update the question.
Update!
I discovered three tricks that work, in reverse order of usability:
Patch keybddr.dll (on this device), re-inject into the ROM via your favourite means. On this device with this factory ROM - it works, but I didn't want to permanently disable it.
Sync to the Power Management message queue and turn the device "on" whenever it says it's going down.
Change the "Power States" in the registry so they're all (most of them) "on". This way, I can use RAPI to disable the power button and have the software on the device "reset" the registry on event x, y and z.