How to attach to ParentForm.Closed?

  • Thread starter Thread starter Boris Drajer
  • Start date Start date
B

Boris Drajer

When is a good moment to attach to ParentForm.Closed event? I want to be
notified when the form is closing, because I want to kill a worker
thread in my control. But, I don't know when the ParentForm property has
a valid value: if I put my control in a tab, ParentForm is null in OnLoad.
 
Register for your control/form's ParentChanged event, then do it there. That
ought to be the first chance you have to know who your parent is.

-Nathan
 

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