Opening mdi child from Browse Dialog


Author
Message
Mike Tomlin
Mike Tomlin
StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)
Group: StrataFrame Users
Posts: 23, Visits: 5.8K
Hi

From an MDI child form I run a browse dialog from a button click. When the user runs the search the custom information panel of the browse dialog shows a list of related items in a StratListView each one having a link.

What I want to do is click on the link, close the browse and open a new MDI child form showing details relating to that link. As the browse dialog opens as modal I'm struggling to reference the MDI parent properly (relative beginner in C#).

If I was opening a new child mdi from an existing child mdi then something like

MainForm loForm;
loForm = (MainForm)this.ParentForm;
loForm.LaunchDialog(typeof(MyNewDialog));

ought to work. 

What do I need to do to get it to work when running from the info panel of a browse dialog?

Many thanks

Mike



Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Have you tried passing your BD as a parameter to your newly created form and then trying to close it from there once shown?
Mike Tomlin
Mike Tomlin
StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)
Group: StrataFrame Users
Posts: 23, Visits: 5.8K
Hi Ivan

I hadn't got that far yet. What I am stuck on is how to reference the mdi parent form so I can open a new mdi child form from the browse dialog which is outside the mdi structure - i.e it doesn't have a mdi parent? Have I explained it better Smile
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Would you be able to open it just as a normal dialog? Something like:

        '-- Instanciate the new form
        Dim MyChildForm1 As New MyChildForm

        '-- show it as a Dialog
        MyChildForm1.ShowDialog()

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search