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

Allowing an MDIChild Form To Also Be Modal

Status
Not open for further replies.

bobbarker

Programmer
Dec 20, 2001
83
0
0
GB
I have an MDI form.

On this form I have 2 menu options.

Menu option 1 calls frmModal which has MDIChild property = false. It is called by
Code:
 frmModal.Show vbModal
as I wish to show it modally. This forms shows a grid with many records

Menu option 2 calls frmChild which has MDIChild property = true. It is called by
Code:
 frmChild.Show

I have a command button on frmChild which also loads frmModal, listing just the record that is viewed in frmChild. It is called by
Code:
 frmModal.Show vbModal
as I wish to show it modally.

When frmModal is loaded from the menu my customer would now also like a command button on frmModal that would load frmChild with the details of the row currently selected on frmModal. If I try
Code:
 frmChild.Show
I get error 401 "Can't show non-modal form when modal form is displayed"

How can I best define frmChild. I want to be able to call it modally from frmModal (therefore can not have it as an MDIChild?), but I also want it to be a modeless form contained with the MDI form when I load it from the menu.

Thanks for your help in advance.
 
Make search for "mdi child modal" in this forum first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top