在winforms中,我正在基于Gecko创建浏览器,并且需要在创建新的tabPage时将geckoBrowser1
,urlBar1 (not yet added)
和back/forwardArrow1 (not yet added)
添加到新的tabPage中。我的问题是复制这些特定资产
我已经尝试过在Google上查找内容,但是他们都在谈论如何从头开始添加新标签页。
private void button1_Click(object sender, EventArgs e)
{
//newTab is the "New Tab" button
GeckoWebBrowser geckoWebBrowser1 = new GeckoWebBrowser();
string title = "tabPage" + (tabControl1.TabCount + 1).ToString();
TabPage tabPage = new TabPage(title);
tabControl1.TabPages.Add(tabPage);
//I want to add the geckoWebBrowser1 into a new tab here
if (newTab.Location.X < Form1.ActiveForm.Width - 50)
{
newTab.Location = new Point(60 * tabControl1.TabCount - 2, 0);
}
else
{
newTab.Location = new Point(newTab.Location.X, newTab.Location.Y);
}
}
我希望我创建的新标签页能够使用Gecko浏览器并将其复制到新标签页中。
答案 0 :(得分:1)
类似这样的东西:
Date →Wed, 03 Apr 2019 15:46:57 GMT
Content-Type →application/json; charset=utf-8
Server →Kestrel
Cache-Control →no-store, no-cache
Transfer-Encoding →chunked