webbrowser-control

Unable to set WinInet proxy from WinForms application

寵の児 提交于 2020-01-25 14:39:52
问题 I'm running windows 7 and IE9. I'm writing a winforms application (.net 4.0 & c#) that runs a proxy server (using TcpListener) on another thread. Before I instantiate the main form i set the proxy using InternetSetOption and start the proxy server. My proxy setting code is very similar to the one here: Set Proxy UserName and Password using Wininet in C# then i browse to a site in IE, IE doesn't connect to my proxy server. also, IE tools --> internet options --> connection --> lan settings -->

Hosting multiple WebBrowser controls in one window causes sessions to “cross”: any solutions?

杀马特。学长 韩版系。学妹 提交于 2020-01-25 10:55:05
问题 I have a Windows forms application written in VB.NET where I host multiple WebBrowser controls in the same window. The problem I'm having is that the session for each WebBrowser control seem to get "crossed" when making asynchronous requests, such as when loading images. For instance, I have WebBrowser1 that loads an HTML document and WebBrowser2 that loads another HTML document. WebBrowser1 hosts an image that's served up by an ASHX page and is dependent on the browser session. The problem

Will I be able to tell a Hosted Internet Explorer Web Browser control to always bypass the proxy settings?

别说谁变了你拦得住时间么 提交于 2020-01-25 06:44:15
问题 Following scenario: Having a hosted IE web browser control and an in-app web server (like this one). The web server runs at (e.g.) http://127.0.0.1:14284 and the web browser calls this URL. Now we have a customer which has a proxy server configured in IE options, and also checked "bypass proxy on local addresses". Unfortunately, the hosted IE web browser control still used the proxy settings, even for the local URL http://127.0.0.1:14284. My question is: Am I somehow able to tell my hosted

How can I clear cookies in the WPF WebBrowser for a specific site?

守給你的承諾、 提交于 2020-01-24 07:21:29
问题 How can I delete authentication cookies for the specific website or it's page? Currently, if I login using OAuth 2.0 through WPF WebBrowser my login session is saved, but I want to reset session each time I close my App. public partial class VKLogin : Window { public string AccessToken { get; set; } public VKLogin() { InitializeComponent(); this.Loaded += (object sender, RoutedEventArgs e) => { webBrowser.Navigate("https://oauth.vk.com/authorize?client_id=5965945&scope=wall&redirect_uri=https

How to get the Document's Title from a Web Browser control in wpf

坚强是说给别人听的谎言 提交于 2020-01-23 12:12:47
问题 I have created a Web Browser control in a TabControl.I want to set the Header of the TabItem to the Document's title of the Web Browser. I used the following code in the Navigated Event of the WebBrowser dynamic doc = tabBrowser.Document; //tabBrowser is the name of WebBrowser Control tab.Header = doc.Title; //tab is the name of the Tab Item But this piece of code doesn't work as it should.The header changes only for a few site. How can i set the Header of the tabItem to the Document's Title

Popup window webbrowser control

社会主义新天地 提交于 2020-01-22 16:12:13
问题 I am using a webbrowser control to get some information from a website. It has a detail link, which when clicked, opens a popup window and shows the details in the webbrowser. How can I do these if click the link in webbrowser control (by program) open another window and showing execution error. But in explorer it is working. And I noticed that detail link works only if I open the main page in Internet Explorer, otherwise if I call the detail URL directly from Internet Explorer, it also gives

Popup window webbrowser control

旧时模样 提交于 2020-01-22 16:11:08
问题 I am using a webbrowser control to get some information from a website. It has a detail link, which when clicked, opens a popup window and shows the details in the webbrowser. How can I do these if click the link in webbrowser control (by program) open another window and showing execution error. But in explorer it is working. And I noticed that detail link works only if I open the main page in Internet Explorer, otherwise if I call the detail URL directly from Internet Explorer, it also gives

Allow System.Windows.Forms.WebBrowser to run javascript

梦想与她 提交于 2020-01-21 05:49:08
问题 Seriously - read the question all the way through before attempting to answer it. "Use a different browser" doesn't answer this question. The question is this: How do I get a System.Windows.Forms.WebBrowser control to display a web page that has Javascript embedded in it when I have no control over the incoming page? I've already seen people suggest adding registry values for IE emulation (Allowing javascript to run on a windows form web browser) and altering the script settings in Internet

Prevent scrollbars with WPF WebBrowser displaying content

旧巷老猫 提交于 2020-01-21 03:02:26
问题 I'm using the WPF WebBrowser component to display some very simple HTML content. However, since I don't know the content size in advance, I'm currently getting scrollbars on the control when I load certain datasets. Basically, how can I force (or otherwise effect the equivalent of forcing) the WebBrowser to expand in size so that all content is displayed without the need for scrollbars? 回答1: I guess you can get width and height of the webbrowser component content through its Document property

Opening Word (.docx) files on a Windows Form C#

老子叫甜甜 提交于 2020-01-20 04:23:13
问题 I'm trying to make my program have the ability to display a Microsoft Word file on a form but not having any luck in doing so. I want to be able to open the file and display it on the form as a Read-Only. So basically just display it's contents. Various users on the web have recommended displaying files in the WebBrowser control (under toolbox). I have tried this but failed to get it working. My end goal is to be able to annotate on top of the web browser (or something of similar manner) and