Addownedform with form in different thread.

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
I have an app that has 1 main form (mdi container) that had Hundreds of menu options each opens a sub form. Due to an issue I needed to recode the opening of these sub forms via creating a new thread for each one. Everything works fine except The main form no longer ownes these sub forms, anyway to have it own the sub forms so when I minimize the main form the subforms close as well?

The issue is I must open these sub forms in a separate thread due to the main form reacts to our VoIP system and we found it crashes if any of the subforms are showing a dialog as the grandparent or main form gets locked from responding if I don't thread it.
 
Last edited:
It does sound as you're going about this the wrong way, and that your (voip) processing/handling should be done in a secondary thread.
 
It does sound as you're going about this the wrong way, and that your (voip) processing/handling should be done in a secondary thread.

The VoIP is being processed on a secondary thread that updates the main thread and updates call status information on the main form and launches secondary forms from main with call information. Neither of which process correctly if there is a dialog open on a grandchild form that was launched from main. Hence the reason all grandparent form openings are done so in new threads.

It's not difficult for me to launch the VoIP relayed forms in a new thread , it is however very difficult to update the main mdi container form appropriately if I don't do this way as any open dialog prevents proper functionality.
 
Back
Top