Which form is showing?

  • Thread starter Thread starter Peter B
  • Start date Start date
P

Peter B

How do you determin if a form is showing? If I want to start a timer when a
form is displayed I can use GotFocus() event: If I want to stop the timer
when another form is shown or the original form is closed, I can't use
LostFocus() since the form loose focus whenever a control on the form gains
focus.

Is there an easy way of capture when the form is either closed or another
form is put infront of the form?

regards,

Peter
 
I think the form.Activated and form.Deactivate events do that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top