Question : VB.Net 2008 Modal MDIChild

I'm working on a program that has an MDI Parent (frmMain) and 3 MDI Childs (frmJobs, frmDatePick and frmTerms).  The reason behind using MDI is, of course, to have the forms open in certain areas.  frmMain is simply the canvas and frmJobs is where jobs are ran.  I need frmDatepick and frmTerms to open modally (ShowDialog) but of course this isn't possible with an MDIChild.  I can programmatically disable all child forms and parent controls when the form is opened and re-enable them when it is closed.  That's not an issue.  

The issue I'm having is pausing the code.  The code runs when btnSubmit is clicked on frmJobs.  It parses a text file for prompt criteria and then opens frmTerms and/or frmDatePick.  At this point I need the code to pause and wait for those forms to be closed before proceeding.  How do I accomplish this?

Answer : VB.Net 2008 Modal MDIChild

You'd do it the same way you're achieving a "Modal MdiChild"...by breaking the code out and making the code "continue" in a separate method  in response to an event such as the "modal" form being closed.  Any attempt to keep the code in the SAME method like ShowDialog() will just end up either locking up the main UI thread or end up using an ugly polling loop with DoEvents().   =\
Random Solutions  
 
programming4us programming4us