views:

248

answers:

2

I want to intercept minimize/maximize events for a windows mobile 6.1 application in c#. Is there a simple way to achieve this. (A piece of code as an example would be great). I need to know when the user plays with my application or the application runs in background.

+1  A: 

Without any testing I'd say: take a look at the Form.Activated and Form.Deactivated events:

From the C# Documentation:

  • Form.Deactivate Event : Occurs when the form loses focus and is no longer the active form.
  • Form.Activate Event: Occurs when the form is activated in code or by the user.
Felix Alcala
A: 

This article seems to cover exactly what you're after.

ctacke