Form focus problem

  • Thread starter Thread starter Tom
  • Start date Start date
Hi,

You can get the active form of the app using Form.ActiveForm

cheers,
 
Tom said:
How to obtain information if the current form is now focused?

I'm not entirely sure what you are asking.

If you mean when a form is FIRST brought up, Form_Load will do that.

If you mean when a form becomes visible for whatever reason, the
VisibleChanged event will be fired.

Another alternative is the Enter event, which will be fired when the
mouse enters the form area.

Matt
 
You could subscribe to the GotFocus event which will be fired when form
receives focus. However, the MSDN documentation suggests using the Activated
event instead.

Hope this helps.

Brian Delahunty
Ireland

http://briandela.com/blog
 
Back
Top