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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MODAL forms and MDI Children

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I was going to do the following:

I have a form with some pieces of information in a grid. User double clicks on a row and a new form with input of the details for this data pops open. User saves data - and I update the grid back on the parent form. I was going to use a modal form for the details, store the values in a static struct upon the save, unload the modal form and then populate the grid in the parent form by referencing the struct. All the pieces were in place but when I run it I find out that apparently I can not call a form modally from an MDI child form.

How else can I accomplish this task? Can I refer back to the this.parent to run a public function (it does not look it). How can I know that the secondary form has been closed and the grid can be refreshed?

 
I do this a lot and it works. You can't make a modal form in a MDI environment only if you set the modal form MdiParent property. If you leave it null, it should work.
 
I figured out the problem already. I a block of code (that I copied from the guy leading the project that had
a line setting the parent of the form to the mdi form. I removed that and it works like a champ. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top