I have a problem. I have an ocx that contains some classes like in a dll. A function call in one of these classes opens a non-modal form that stays visible while the function call returns. The form has a timer which does some job and eventually unloads the form. So far, so good.
Now I would like to make the form invisible. When I do this, the form gets terminated almost instantly. Is there a way to prevent this?
Thank you for your reply. So if I understand it correctly, the problem is that I don't keep a reference to the object. But why is the object terminated when the form is invisible, while it is not terminated when the form is visible? Isn't it possible to keep an unreferenced object alive until you terminate it from the object itself?