how to create new tab but not jump to it

Topics: Developer Forum, User Forum
Sep 8, 2009 at 9:45 PM

I am trying to mimick  the option in firefox to open a browser in a new tab- without jumping to the new tab.


I have done this using the code below to instatly jump back from the new tab to the current active tab. I would like to avoid the flicker by not opening the new tab at all.

creating an instance of  a childform automatically creates a new tab. The last line jumps back to the previously selected tab.

I suppose I need to access and change the source code where it automatically selects a new tab once it is created.

MDIParent2 mp = (MDIParent2)(Application.OpenForms["MDIParent2"]);
                WindowManagerPanel wp = ((WindowManagerPanel)mp.windowManagerPanel1);
                WindowTabStrip senderTab = wp.TabStrips[0];
                WrappedWindow ww = (WrappedWindow)senderTab.SelectedItem;
                Form1 childForm = new Form1();
                childForm.MdiParent = mp;