Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

How to attach to ParentForm.Closed?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris Drajer - 07 Apr 2005 14:49 GMT
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.

Signature

Boris Drajer <boris.drajer@do.not.s.p.a.m.micro-bs.com>

Nathan Ernst - 07 Apr 2005 16:05 GMT
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

> 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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.