C# - 如何将三个或更多不同的SHDocVw.InternetExplorer组合成新选项卡 [英] C# - How to combine three or more diffrent SHDocVw.InternetExplorer to be new tab
问题描述
我用SHDocVw.InternetExplorer制作了三个不同的实例。
这不仅仅是制作新的标签。我已经知道如何使用现有的资源管理器创建新标签。
就像在制作三个不同的新InternetExplorer实例之后再将其中一个放入新标签。
1)
I have made more the three different instances each with SHDocVw.InternetExplorer.
It's not about just making new tabs. I already know how to make new tab with existing explorer.
It's like After making three diffrent "new" instances of InternetExplorer then put one in another one to be new tab.
1)
string url1 = "http://codeproject.com/";
InternetExplorer ie1 = new InternetExplorer();
ie1.Navigate(url1);
2)
2)
string url1 = "http://google.com/";
InternetExplorer ie1 = new InternetExplorer();
ie1.Navigate(url1);
3)
3)
string url3 = "http://microsoft.com/";
InternetExplorer ie3 = new InternetExplorer();
ie3.Navigate(url3);
是否有任何方法可以将ie2,ie3中的ie3作为ie1的新标签?
因为我想将每个InternetExplorer放入InternetExplorer []数组中。
非常感谢任何帮助。
Is there any method to put ie2, ie3 in ie1 to be new tabs of ie1 ?
Because I want to put each InternetExplorer into array of InternetExplorer[].
Any help is greatly appreciated.
推荐答案
不,你不能把对象实例放到对象实例。
要创建类似的东西,你需要创建一个像InternetExplorerWindow这样的容器对象(没有,我只想告诉你创建一个像这样)然后允许它尽可能多地使用InternetExplorer实例,就像选项卡一样。您可以尝试使用通用List对象来包含这些对象实例。
No, you cannot put an object instance to an object instance.
To create something like that, you will need to create a container object like InternetExplorerWindow (there isn't any, I'm just trying to tell you to create one like this) and then allow it to have as many InternetExplorer instances in it as it can, just like the tabs. You can try using a generic List object to include those object instances.
这篇关于C# - 如何将三个或更多不同的SHDocVw.InternetExplorer组合成新选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!