Is it possible to programmatically lock a windows phone 7 device?
I'm creating a WP7 app that needs to continue running when the user is not using the phone - ideally the user sets it going, locks the phone and carries on with their life.

Is this possible?

I know it is possible to disable the lock screen, so if the user were to just leave the phone on a table it would be fine and carry on running. The problem is when they put it in their pocket - buttons will get pressed such at the windows/home button, and if this happens then the app is tombstoned straight away.

Any ideas if this is possible? Either somehow locking the phone without tombstoning the app, or implementing a sort of custom lock screen and handling the events for all the hardware buttons including the windows/home button?

Any suggestions will be appreciated.
Is it possible to programmatically lock a windows phone 7 device?
===

I'm creating a WP7 app that needs to continue running when the user is not using the phone - ideally the user sets it going, locks the phone and carries on with their life.

Is this possible?

I know it is possible to disable the lock screen, so if the user were to just leave the phone on a table it would be fine and carry on running. The problem is when they put it in their pocket - buttons will get pressed such at the windows/home button, and if this happens then the app is tombstoned straight away.

Any ideas if this is possible? Either somehow locking the phone without tombstoning the app, or implementing a sort of custom lock screen and handling the events for all the hardware buttons including the windows/home button?

Any suggestions will be appreciated.