webbrowser-control

Handling key events on WebBrowser control?

风流意气都作罢 提交于 2019-12-10 19:54:23
问题 Currently I am using an application which play ppt and flash in WebBrowser Control. In WebBrowser I am able to hide context menu by using this.IsWebBrowserContextMenuEnabled = false; and capture key event by using this.PreviewKeyDown += new PreviewKeyDownEventHandler(IWebBrowser_PreviewKeyDown); but while playing the ppt , both context menu and keypress events are not functioning i.e. I can see context menu and arrow key force the ppt to change the slide. Again while playing flash, context

C# WPF Displaying WebBrowser on window with AllowTransparency=“true” does not display

喜夏-厌秋 提交于 2019-12-10 19:04:40
问题 I am displaying a window with a WebBrowser control on it. I want the windows to be frameless so I have set WindowStyle="None" This works BUT displays a colored border around the window. Allowstransparency="true" removes this BUT the WebBrowser is no longer displayed (buttons are) I have found http://www.neowin.net/forum/topic/646970-c%23-wpf-window-with-transparency-makes-windowsformshost-disappear/ BUT I cannot get it to work (SetWindowsLong Parameter error) Window x:Class="ZoomBrowserWPF

How come HTMLDocumentEvent onclick fires up multiple times?

╄→尐↘猪︶ㄣ 提交于 2019-12-10 19:02:15
问题 I am using Visual C# Express 2010 (.NET Framework 4.0), Windows 7 32bit. I created WinForm project which only has WebBrowser control and ListItem object that displays the html information by onclick event. My goal is to run the project and click text field in web site in the webbrowser control and display the html document info that has been clicked (such as text field tag etc) code namespace WindowsFormsApplication1 { public partial class Form1 : Form { private mshtml.HTMLDocument doc = null

c# WebBrowser- How can I wait for javascript to finish running that runs when the document has finished loading?

一个人想着一个人 提交于 2019-12-10 18:49:01
问题 I'm working on a project that involves scraping some product data off of a vendor's web site (with their blessing, but not their help). I'm working in a C# shop, so I'm using the .NET Windows Forms WebBrowser control. I'm responding to the document completed event, but I'm finding that I have to thread sleep for a little bit, or else the data doesn't show up where I expect it to in the DOM. In looking at the javascript on the page, I can see that it is dynamically altering the existing DOM

Wpf webbrowser, how to detect when it tries to download?

时光怂恿深爱的人放手 提交于 2019-12-10 18:41:39
问题 When you use the C#.Net wpf WebBrowser control to view html pages, and the user clicks on a link to a file with an unknown extension, the webbrowser tries to download this file. On systems with no pdf viewer installed, webbrowser tries to download pdf files instead of either displaying them or warning the user that they need Adobe, etc. I would like to detect when a webbrowser tries to download, so I can check if the file is pdf and then provide a download link. Is this possible? 来源: https:/

Make WebBrowser control to delete its cache

喜你入骨 提交于 2019-12-10 18:36:10
问题 so i am making a test application which login to a website and if given credentials are valid then separates them. when my webbrowser get successful login and program starts to repeat to process in order to check remaining credentials the logged in account gets cached. i tried Me.WebBrowser1.Refresh(WebBrowserRefreshOption.Completely) and couple of other methods like nevigating to about:blank but no success even when i restart the program webbrowser1 opens to cached logged in account. i want

WPF WebBrowser Recent Pages

不羁岁月 提交于 2019-12-10 18:29:26
问题 Just wondering if there is a way to access the recent pages visited in the WPF WebBrowser. It obviously keeps track of the pages, as evidenced by by the Go[Forward/Back] functions. I am planning on making a database to keep track of it, but I didn't want to do extra work if it was pointless to do so. I am guessing those details are purposely hidden to the user. 回答1: No I don't think that's possible, there's just the GoForward/GoBack methods to use. The history in the WebBrowser control seems

WebBrowser control won't print from C#

こ雲淡風輕ζ 提交于 2019-12-10 17:35:50
问题 I've got a WebBrowser control on a WinForms app that is loading XML which is converted to HTML/CSS. Looks beautiful if I just want to view it there or in a regular browser. When the form loads, it's supposed to navigate to the file, then when the OnDocumentCompleted event fires, it should set the header, footer, and default printer name in the registry, then call Print() for however many copies the user has specified. I've run it through the debugger, and it's calling webBrowser.Print() the

Obtain child anchor element within WebBrowser control

廉价感情. 提交于 2019-12-10 16:59:56
问题 Preamble I'm using the WebBrowser control, which a user will interact with, so a solution will need to work with a visible WebBrowser control. Question How do I check if an element has an anchor as a child? All browsers are able to distinguish that an element contains an anchor ( <a href=""... ), and offers "open in new tab" functionality. That is what I am attempting to replicate. However, when I right click on a HtmlElement I'm only able to obtain the parent element. Example Taking the BBC

How to automatically enable ActiveX Elements inside a webBrowser Control

佐手、 提交于 2019-12-10 16:57:35
问题 I have a WebBrowser Control in my WPF Application, when I now load a local .html file that will display a .swf file, it works, but only after I accept the ActiveX-Warning. Is it possible to change the options of the WebBrowser Control to automatically enable ActiveX Elements such as flash-files? 来源: https://stackoverflow.com/questions/8205326/how-to-automatically-enable-activex-elements-inside-a-webbrowser-control