2016-08-19 115 views
0

我正尝试使用WebControl以代理方式打开网站。 我试过了我能找到的所有东西,但没有成功。Awesomium WebControl不能与WebSession配合使用

我正在创建一个WebControl,WebPreferences &一个WebSession,但是当我运行代码时什么都不显示。

string Proxy = "208.83.6.19:3128"; 

WebControl wc = new WebControl(); 
Browsers.Controls.Add(wc); 
wc.Dock = DockStyle.Fill; 

WebSession session = WebCore.CreateWebSession(new WebPreferences() { ProxyConfig = Proxy, SmoothScrolling = true }); 
wc.WebSession = session; 
wc.Source = new Uri("http://checkip.dyndns.com/", UriKind.Absolute); 

感谢您所有的帮助,我可以得到!

回答

0

这看起来很基本,但是......您何时将控件添加到您的窗体?

this.Controls.Add(browser);