webbrowser-control

Why my implementation of IDocHostUIHandler is ignored

不羁的心 提交于 2019-11-28 08:48:08
问题 I have created derived control from WebBrowser control that has own IDocHostUIHandler implementation following idea from CreateWebBrowserSiteBase method: The WebBrowser.WebBrowserSite class provides default implementations of the OLE IDocHostUIHandler interface. You can provide your own implementation of this interface or implement any other WebBrowser ActiveX control interface in order to customize the behavior of the control. The problem that is not working. My code looks next way:

How to set FEATURE_BROWSER_EMULATION to IE8 mode?

瘦欲@ 提交于 2019-11-28 08:45:41
We are using an embedded SWT Browser in a Java application. The SWT Browser wraps an IE8 WebBrowser Control object. I am running into the well-known issue that by default, the WebBrowser Control uses IE7 mode instead of IE8 mode. (See http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx ) Per this and other articles, I am trying to set the FEATURE_BROWSER_EMULATION registry value for my application so that the Browser defaults to IE8 mode, but I am having mixed success. Setting it to IE8 Standards Mode using the value 8000 does not work, butsetting it to

Grabbing Cookies in Web Browser Control - WP7

﹥>﹥吖頭↗ 提交于 2019-11-28 07:06:19
In order to log into a certain part of a website the users of my application require their cookie. To do this I need to grab it and pass it to url. Does anyone know how to grab a certain websites cookie from the browser control? I saw this method but wasn't quite clear. Thanks, TP. As of WP 7.1 Mango "release", if one may call it, please see the WebBrowser Control Overview for Windows Phone . It has been recently updated a little bit, and it turns out that they actually have added some support for cookie-retrieval from the WebBrowser. On the bottom of the page you will find a tiny link

How do I submit a form inside a WebBrowser control?

和自甴很熟 提交于 2019-11-28 06:56:00
How can I create a program with C# to submit the form(in the web browser CONTROL in windows Apps)automaticlly ? The WebBrowser control has a Document property , which returns an HtmlDocument . The HtmlDocument has several members you can use to traverse and manipulate the DOM. Once you've used these methods to find the form, you can use InvokeMember to call the form's submit method. If you know the page has a single form: foreach (HtmlElement form in webBrowser1.Document.Forms) form.InvokeMember("submit"); If you know the ID of the form you would like to submit: HtmlElement form = webBrowser1

Getting contents of specific div element?

佐手、 提交于 2019-11-28 06:42:11
问题 is it possible to get the contents of a tag from a web browser control like this: <div class="desc">contents</div> and then strip all HTML characters from it? say WebBrowser1 has a website loaded into it. I want to extract the source code from it and find this: <div class="desc"><b>these are the contents I want</b></div> and extract it like this: these are the contents I want 回答1: Dim divs = WebBrowser1.Document.Body.GetElementsByTagName("div") For Each d As HtmlElement In divs If d

Script runs slower in the dotnet WebBrowser control

空扰寡人 提交于 2019-11-28 06:34:57
问题 I use the WebBrowser control and Smooth Div Scroll in my winforms application to render a html marquee. I downloaded the sample and added autoScrollingInterval: 3 to $("div#makeMeScrollable").smoothDivScroll({ autoScrollingMode: "onStart" }); to make it move faster. When I open the sample in IE it works just fine but when I use the WebBrowser control and call the navigate method the scroller moves much slower. What is causing this problem? 回答1: As I understand it, the issue you are dealing

Upload a file to a website programmatically?

别说谁变了你拦得住时间么 提交于 2019-11-28 05:59:43
问题 I am using Lazarus I have an app with webbrowser component on it that logs into a website loads a page as below (see html code below), and fills in different inputs. The last input is a file to upload. I would like my app to "click" Browse, select a file i want to, and Open. After that I could do a post the form OR just upload the file and carry on. 1 I have the following html code on the site: <td align="left" class="RequiredInput">File:</td> <td class="datafield"> <form name="frmMain" id=

How to load mht from stream/string into a WebBrowser control?

只愿长相守 提交于 2019-11-28 05:17:45
问题 The WebBrowser control loads properly any mht file if I use the Navigate method, but when I use the DocumentText or DocumentStream properties, the source of the mht file is displayed as if I opened the file in notepad. If I write the stream to a temp file then Navigate to it, it works properly, but I don't want to do it this way. This issue seems common, but I didn't find a working solution for it. Some people suggest I should fool IE by implementing IPersistMoniker com interface, ...etc. I

Web Browser component is IE7 not IE8? How to change this?

瘦欲@ 提交于 2019-11-28 05:16:57
So I have an C# Form application that utilizes the web browser component. Apparently Response.Write(Request.Browser.Version.ToString()); returns "7.0" when I visit my test page from the web browser component. How can I make this web browser component use IE8? Plip It appears you need to fiddle with the registry as per this article: - http://blogs.msdn.com/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx To run a WebBrowser control in IE8 Standards Mode, use the following new value into the registry: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer

.NET Webbrowser Control and Dispose()

妖精的绣舞 提交于 2019-11-28 05:16:54
问题 I know this is a hot discussed topic with many questions and answers but I still do not find the solution for the following problem: I have a multi-tab application. On every tab is a Webbrowser control. As the webbrowsers take more an more memory for every new tab and they do not free this memory on tab-close, I decided to make a Webbrowser.Dispose() in the tab close event handler. This helped me concerning the memory leak. all the used RAM is now free after closing. But this caused a new