NewWindow2 and MDI form problem (C#) - Please

From: Mike Z (anonymous_at_discussions.microsoft.com)
Date: 04/22/04

  • Next message: dereksimpson_at_vs.shawcable.net: "Beastialit Gone Wrong Home Pics"
    Date: Thu, 22 Apr 2004 16:31:03 -0700
    
    

    Hi! I am trying to create a C# application that has one MDI form with embedded WebBrowser control.
    When a user clicks on one of the links, the JavaScript window.open() function will open a new window.

    I want this new window be displayed as the MDI Child to the original window. I have the following code
    on Form1 (parent):

    private void axWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
    {
    Form2 frmWB;
    frmWB = new Form2();

    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    //frmWB.MdiParent = this;

    frmWB.axWebBrowser2.RegisterAsBrowser = true;
    e.ppDisp = frmWB.axWebBrowser2.Application;

    frmWB.Visible = true;

    }

    Problem: As soon as I uncomment //frmWB.MdiParent = this; I can not span the MDI Child window.
    Nothing happens. Is this a bug? What can I do to avoid/bypass/fix etc?

    Your help is greatly appreciated!


  • Next message: dereksimpson_at_vs.shawcable.net: "Beastialit Gone Wrong Home Pics"

    Relevant Pages

    • Error creating window handle while databinding in a MDIChild form load
      ... I have an MDI form that is the start up project. ... I call a procedure to load a global ... Additional information: Error creating window handle. ... The textboxes and checkboxes in the tab control are bound to the ...
      (microsoft.public.dotnet.framework.windowsforms.databinding)
    • Close a menu
      ... I' m sublclassin my MDI form to handle Menu drawing, ... I recentely added F1 functionalities to allow the user to call on-line help ... Since the hep window gets positioned on top of the MDI form, ...
      (microsoft.public.vb.winapi)
    • Re: MDI question with little answers
      ... > programs as children in my MDI form. ... child window of your MDI window. ... Most apps don't do this. ... My .NET Blog: http://weblogs.asp.net/fbouma ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: NonChild Modal Window will not die
      ... >Application is an MDI Form. ... With some functionality, ... >where we cannot quite cleanup the spawned modal window. ...
      (microsoft.public.vb.com)