Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't unload DLL form

Status
Not open for further replies.

simonkue

MIS
Jul 9, 2002
105
GB
I am creating my first dll. This will be called by many programs. It's function is to allow the saving of form controls (into a text file) and then to allow another user on another pc to load up the data into the same pgm.
The dll will display a form showing "Job information". This form is the same whatever the pgm that calls it.
I can display the form from the pgm. It picks up the correct data file and updates the controls on both the "Job info.." and pgm's own forms.
When I try to unload the "Job info.." form, it only goes away if I click on the top right X. Unloading it or calling the Terminate event don't get rid of it and have no apparent effect.
Does anyone have any ideas why it won't go away......?
 
How are you doing the form unload? Are you retrieving any values from this form after you unload it? If so, that will cause it to reload. If you need data from it in your main app, you can hide the form instead of unloading it so you can retrieve the info. Better yet, add a class that handles the info and let it handle the form instead of your main app.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Thanks for your help ArtieChoke - you helped me think about this in another way!

The problem was that I was unloading the form at the wrong level - at the lower Job form level. To solve this I used the exit button to raise an event to the controlling class (which does manipulate form properties to allow transfer of data between the class and the form) and then used a new event in the class to unload the form. Hey Presto and as if by magic, the form unloads!

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top