webbrowser-control

LoadCompleted Not Firing in WPF WebBrowser Control

做~自己de王妃 提交于 2019-12-20 03:56:15
问题 I have a simple WPF webBrowser control that I am using to automate a website. The page that I'm trying to load is an ASP.NET page. When I try to navigate to it normally, LoadCompleted is never fired. If I try to navigate to it, and read the elements with an IHTMLElementCollection in the Navigated event, then the LoadCompleted event does fire. It doesn't make sense to me. The LoadCompleted event should fire regardless, because I'm loading a page in both situations. Any ideas? 回答1: It turns out

Wpf WebBrowser Refresh

岁酱吖の 提交于 2019-12-20 03:48:12
问题 I am using WebBrowser control in my project. And i noticed that if the user press right click -> Refresh the Navigating LoadCompleted not called. And another strange thing is that after i press the refresh and click another link in the webbrowser the LoadCompleted not called too. This is how i navigate the page in the start : nrowser.Navigate(MYPAGE); Any idea what can be the problem? Can i fix it with JavaScript ? 回答1: You can handle a refresh and differentiate it from navigation. With a

Task is not completing second time [Intermittent Issue] – Async/ Await

我与影子孤独终老i 提交于 2019-12-20 03:34:16
问题 I have a WebBrowser control is Windows Forms project. It navigates through all the urls available in “MyTableTest.html”. There are four urls in this page and the webbrowser goes through each one – one by one. Once it reaches the last one it should go to the first again. It works fine in the first iteration – but not going to the urls in the second iteration. This is an intermittent issue - certain times it works. It seems (from the log) that he awaited task is not completed. What can be done

Task is not completing second time [Intermittent Issue] – Async/ Await

南笙酒味 提交于 2019-12-20 03:34:06
问题 I have a WebBrowser control is Windows Forms project. It navigates through all the urls available in “MyTableTest.html”. There are four urls in this page and the webbrowser goes through each one – one by one. Once it reaches the last one it should go to the first again. It works fine in the first iteration – but not going to the urls in the second iteration. This is an intermittent issue - certain times it works. It seems (from the log) that he awaited task is not completed. What can be done

Webbrowser Control - displaying text using “write”

无人久伴 提交于 2019-12-20 03:21:46
问题 I'm using the IWebBrowser2 interface to render a page from an HTML string created at runtime. I have written a method (let's call it DisplayHtmlString) that takes an HTML string and renders it as shown in this example. The method also calls Navigate2 with "about:blank" first, to ensure a document is present, and it also calls close after calling write. The first time I call DisplayHtmlString, the page is always rendered correctly, i.e. the browser displays HTML according to the string I pass.

Progress bar for a web browser control

好久不见. 提交于 2019-12-20 03:20:28
问题 How can I put, and use, a progress bar for my web browser control, in a windows application project, using the c# language? 回答1: Look at the WebBrowser.ProgressChanged event. 回答2: The WebBrowser control has a ProgressChanged event: You need to attach an event handler to the ProgressChanged event: WebBrowser1.ProgressChanged += WebBrowser1_ProgressChanged; This is shorthand for: WebBrowser1.ProgressChanged += new WebBrowserProgressChangedEventHandler(WebBrowser1_ProgressChanged); The compiler

WPF WebBrowser Control disable pinch and zoom on win8 desktop

巧了我就是萌 提交于 2019-12-20 02:56:31
问题 Is there a way to disable pinch and zoom on a WPF WebBrowser Control. The enviroment is a win8 Desktop WPF app using .NET4.0. With a regedit setting that tells it to use IE10 engine. I have already tried using css to disable it but does not work for WebBrowser Control. It does work if the page is viewed from web browsers. 回答1: If still interested, you'd need to disable Disable IE Legacy Input Model for WebBrowser control. I've just answered similar questions here and here, with a working

WebBrowser Navigating function doesn't work and handlers are not called

喜欢而已 提交于 2019-12-20 02:43:27
问题 Code below. I am trying to navigate to a website and read information, the problem is that Navigate doesn't work, the only event that is called is Navigating and the printed Url is empty, the other events are never called. what am I missing? do I have to use Form class in order to navigate? can't I use it programatically from a Console application? Please help. class WebNavigator { private readonly WebBrowser webBrowser; public WebNavigator() { webBrowser = new WebBrowser { AllowNavigation =

How to register own protocol using the WebBrowser control?

爱⌒轻易说出口 提交于 2019-12-20 02:15:26
问题 In a WP7 Silverlight application with a WebBrowser control I want to use an own protocol like "myttp://" to deliver some local content. I can't use Navigate() to an IsolatedStrorage because some content will by created on demand. For the same reason NavigateToString() is also not usable for me. I tried to register a WebRequestCreator descend for my MYTP protocol myCreator = new MyRequestCreator(); WebRequest.RegisterPrefix("mytp://", myCreator); but it isn't called from the browser control if

Show VB6 forms when click a link in html page of webbrowser

时光怂恿深爱的人放手 提交于 2019-12-20 01:39:52
问题 I am working with VB6 WebBrowser, Here i need to open a vb6 form when user click any particular link of WebBrowser 's link like In HTML <html> <head> <body> <a href="--show vb6 form--">Click To show VB6 Form2</a> </body> </html> I do't have any idea how to do it. I thought sometime it can be done a third text file like when the link clicked will write a cod like 002 in a text file. And the in vb form a Timer will check once a second the file, when timer detect the file contains 002 it will