tags:

views:

92

answers:

2

I need to perform some action when my application receives focus.

I've tried hooking both GotFocus- and Enter-events, but they only trigger when focus changes within my application.

Scenario is that my application detects some problem that must be resolved elsewhere, and I would like to do the check again when the user goes back to my application.

+4  A: 

I would try overriding Form.OnActivated (or handling the Form.Activated event) in your application form.

Charlie
+1  A: 

Try hooking the Activated event.

ICR