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

MDI forms - Modal children

Status
Not open for further replies.

markSaunders

Programmer
Jun 23, 2000
196
GB
does anyone know the best method to make an MDIchild form [appear to be] modal to another?

i was thinking of using the .locked for the parent and storing some data for the current frm as to who its 'parent' form is (thus unlocking the parent on closing the 'child')?

any help would be appreciated...
m
 
disabling the parent form is what I do, not very elegant though.
 
Not having a MDI child (he, he), and displaying it modally, tricky ...
 
i'm fairly sure it needs to be done through the [tt]locked[/tt] or [tt]enabled[/tt] properties BUT the problem with disabling the form is that there may be several methods of navigating to a particular form so i need some way of a form holding information about how it was opened (such as the name of the opening form in the opened form's [tt]tag[/tt] propert?) - in order that the correct form may be re-[tt]enabled[/tt] on closing of the 'child'.

the forms i wish to make modal are sub applications (for example when entering a stock code - another form may be opened to create a new supplier) where the sub-application in this instance is modal to the calling application. in another instance the create new supplier form may be opened directly and thus there is no parent (other than the MDI form itself).

if, for example, a user was entering a new product and as a consequence had to open up the sub-app to create a new supplier the newProduct form should be disabled until the createSupplier form is closed. IF - during this activity - the user navigates to the createSupplier form via another method then the calling form in that instance should also be locked and BOTH forms should be [tt]enabled[/tt] after closing the createSupplier form.

cheers
 
That's what I mean when I say it's inelegant.

What I usually end up doing is setting properties on the called form so that I know from within that form haow it was called and from where.

It is never pretty though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top