深拷贝System.Windows.Forms.WebBrowser对象/恢复状态对象、状态、Windows、System

2023-09-04 03:17:00 作者:没空认识你

从本质上讲就是我想要做的就是复制一个WebBrowser对象,这样我可以做到打开在新标签相当于或在新窗口打开行为,维护任何已发布的数据。我不只是要导航到相同的URL在原来的web浏览器对象,而我要重复的HttpWebRequest的。这可能吗?怎么样?

Essentially what I want to do is copy a WebBrowser object such that I can do the equivalent of "Open In New Tab" or "Open In New Window" actions, maintaining any posted data. I don't just want to navigate to the same URL as in the original WebBrowser object, rather I want to repeat the HttpWebRequest. Is this possible? How?

推荐答案

我相信WebBrowser对象是控制的,因此它有一个窗口句柄,这是会导致问题,如果你尝试克隆它。我不认为你会得到你想要这样的行为。

I believe the WebBrowser object is a control, and therefore it has a window handle, which is going to cause issues if you try to clone it. I don't think you're going to get the behavior you want doing this.

 
精彩推荐
图片推荐