webbrowser-control

Handling key events on WebBrowser control

自作多情 提交于 2019-11-29 14:55:28
问题 I am using the WebBrowser control in a C# application and want to handle all key events while the WebBrowser has the focus, regardless what individual content element (input field, link, etc.) is focused. I tried to simply add an event handler to browser controls KeyDown event, but this does not work. I don't want to explicitly hook a handler to each focusable HtmlElement . How can I receive all key events before they are passed to the browser or its content elements? 回答1: you have the

OLE Container for .NET

我与影子孤独终老i 提交于 2019-11-29 14:46:06
I'm working on a project that requires me to load an OLE object and render it in a .NET WinForm app (C#). Unlike VB6 .NET has no built in OLE container, and the recommended approach is to use the WebBrowser control which supports displaying ActiveX content. The issue I have is the provider of the OLE object in question does not have an ActiveX control available. Simply put is there any way to load an OLE object onto a WinForm? Or will I need to write an ActiveX control that loads the OLE Object? If the latter, does anyone have an example of this, or recommended reading material? cheers, Marc.

WebBrowser control as User Interface

泄露秘密 提交于 2019-11-29 14:02:27
First a few definitions to keep things clear. User: A live person, using the software Client: A company that is paying for a customized version of our software for their users. We currently have a few applications that are going to require significant changes in the user interface based on which client the user belongs to. We currently have a separate build for each client, but as the number of clients increase, it's becoming more of a pain to manage all of those separate releases. My goal is to switch to a single generic client that can be customized dynamically based on who is logging in.

IE 11 WebGL performance slow when using WebBrowser control

你。 提交于 2019-11-29 13:06:55
问题 I'm trying to embed Cesium in a WebBrowser control inside of a WinForms or WPF application (using IE 11). As a test I'm using this link: http://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html?stats=true It "works" but is much much slower than using IE 11 directly. In IE 11, everything runs at 60fps; in a simple WPF or WinForms app with the WebBrowser control it runs at 4-6 fps. I've been unable to track down the cause of the problem. This is with a blank Form or WPF Panel with the

Custom IInternetSecurityManager not being called with dialogs

我的未来我决定 提交于 2019-11-29 13:02:40
Hello and thank you for looking. Problem Description: I have implemented a c# WinForm application with the browser control embedded and have implemented IInternetSecurityManager to perform the tasks we need in order to allow cross-domain access in iframes with our locally installed web pages. All things are working as expected with IInternetSecurityManager, IOleClientSite, IDocHostShowUI and IDocHostUIHandler. In other words, we are being called by the browser control for all of our implementations. The problem is when the web page loaded in the browser control has script that calls window

Getting contents of specific div element?

不问归期 提交于 2019-11-29 13:01:47
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 Dim divs = WebBrowser1.Document.Body.GetElementsByTagName("div") For Each d As HtmlElement In divs If d.GetAttribute("className") = "desc" Then Return d.InnerText End If Next 来源: https://stackoverflow.com/questions

InvokeMember(“click”) in WebBrowser control

允我心安 提交于 2019-11-29 12:54:29
A website shows a table based options to choose. HTML is <td width="33%" class="cont"><input type="radio" name="gatewayIDV" onclick="setBank(11,0,1)"> <td width="33%" class="cont"><input type="radio" name="gatewayIDV" onclick="setBank(3,0,1)"> I want to Invoke click of radio of string "setBank(11,0,1)". How do I? all radio name are same but onclick() parameter is different. in JavaScript someone does this some code are here but how I do this in c# I try this but never work: if (webBrowser1.DocumentText.IndexOf("setBank(11,0,1)", StringComparison.InvariantCultureIgnoreCase) > 1) { webBrowser1

Script runs slower in the dotnet WebBrowser control

白昼怎懂夜的黑 提交于 2019-11-29 12:53:05
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? Erx_VB.NExT.Coder As I understand it, the issue you are dealing with is a versioning issue with the WebBrowser Control rendering in IE 7 Standard Mode and

how to apply custom font to web browser content WP7

旧时模样 提交于 2019-11-29 12:48:52
Am developing simple app for learning webBrowser concept in Windows phone. My aim is to display the content in Telugu(Indian language) in my WP7. that web application is displaying Telugu content only my MainPage.xaml.cs code is : private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { webBrowser1.Navigate(new Uri("http://www.eenadu.net", UriKind.Absolute)); } in MainPage.xaml file <phone:WebBrowser HorizontalAlignment="Left" Margin="0,92,0,0" Name="webBrowser1" VerticalAlignment="Top" Height="575" Width="468" FontFamily="Fonts/eenadu.ttf#Eenadu" /> and i have included

Upload a file to a website programmatically?

情到浓时终转凉″ 提交于 2019-11-29 12:38:58
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="frmMain" action="upload.asp?step=2&output=1" method="post" enctype="multipart/form-data"> <input type=