MDI Web Browser

pagego

Freshman
Joined
Jan 30, 2003
Messages
27
Location
Milwaukee, WI
I am trying to create a MDI browser application. Form1 contains each instance of the browser (form2). How can I set the parent of the new browser window when a new window is opened using the NewWindow2 Event (when a popup opens, a user right clicks and selects 'open in new window', or when a user holds shift when opening a link. I am using an array to hold each instance of form2. Thanks in advance for your help.
 
When you create a new instance of a window set its Owner property to this. Ex: NewBrowserWind.Owner= this;
 
NO!

First of all, I need visual basic.net, and secondly I don't think you read the original message carefully. I need to set the parent form from the child form. Or call the child's event from the parent form. Thanks for your help.
 
I don't know VB syntax but C# is very similar in .net. I am quoting this directly from my book:
"The application window of an MDI program is called the parent window, and each window inside the app is referred to as a child window. Although an MDI app can have many child windows, each has only one parent window. Child windows cannot be parents themselves and cannot be moved outside their parent. Otherwise a child window behaves like any other window."

Also, from my book:

Child mdiChild = new Child("child1");
mdiChild.MdiParent = this; // Me in VB. (I think)
mdiChild.Show();

I am sorry I don't know VB well enouph to post code for you. Usually when someone post VB I can translate it to C# but not the other way around so well. You should do fine.
 
Back
Top