webbrowser-control

Host Silverlight in the Windows.Forms without the WebBrowser control

别等时光非礼了梦想. 提交于 2019-11-30 04:10:38
问题 Is it possible to host Silverlight in the Windows.Forms without the WebBrowser control to avoid unnecessary COM marshaling? EDIT : The goal is to use a rich graphic content like WPF or Silverlight on older platforms like Windows 2000. 回答1: All the available options to host Silverlight on a host like windows application are listed below: Msdn Documentation Rahul Gangwar Technical Consultant Microsoft 回答2: Although it may be possible to hack a solution together that doesn't use IE as a host for

Controlling Browser using Python?

China☆狼群 提交于 2019-11-30 03:44:51
Is it possible to control a web browser like Firefox using Python? I would want to do things like launch the browser force clicks on URLs take screenshots etc. Tim McNamara Selenium Remote Control is a project that comes very close to what you are after. It is really easy to get working in Python with the selenium.webdriver subpackage that comes with it. Once upon a time, these were two projects. They've now been unified. Installation Simple! $ pip install -U selenium Usage >>> from selenium import webdriver >>> ff = webdriver.Firefox() >>> ff.get("http://stackoverflow.com/q/3369073/395287") >

How to use 'Back' & 'Forward' navigation button events in WPF WebBrowser?

萝らか妹 提交于 2019-11-30 03:43:53
问题 The WebBrowser control in WPF is inherited from the UIElement , but we cannot register event handlers in UIElement events. Why is it? At WPF WebBrowser Mouse Events not working as expected, it is answered but I still cannot understand. Anyway, hooking up handlers to the events provided by the document of the WebBrowser can catch most mouse events but cannot use 'Back' & 'Forward' navigation button events. Since the internet explorer can do this, I think it is possible. Is there any way to

How to disable caching in the .NET WebBrowser Control?

て烟熏妆下的殇ゞ 提交于 2019-11-30 03:09:43
问题 I have been googling for hours and trying to figure this out, and I just can't. I have 1 webbrowser control on a form, webbrowser1. Once I load a page, say google.com, if I use webbrowser1.refresh() or webbrowser1.navigate("google.com") , it's not reloading the page, it has it cached so it's just reloading the cache. This is terribly apparent especially on pages like forums or craigslist. I need to clear the cache between each refresh (not ideal) or disable caching all together, any ideas?

Getting WebBrowser Control To Work In Console Application?

蹲街弑〆低调 提交于 2019-11-30 02:25:56
问题 I have a printer class that is capable of printing HTML via the WebBrowser object. I want to be able to print from a console application, but I get an error when my printer class tries to create a WebBrowser object: WebBrowser browser = new WebBrowser(); Error: ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment. I tried adding a reference to System.Windows.Forms into my console application but that

Use Chrome engine in WebBrowser control WinForms

馋奶兔 提交于 2019-11-30 01:09:53
问题 Can you use Chrome Web Browser webkit engine in WebBrowser control in WindowsForms? 回答1: You can use chrome's webkit as a different webbrowser component, as answered before here and here. I suggest you to read the answers already posted here on SO as they contain really good clues. 回答2: You can try using WebKit. Chrome it self is not a COM and can't be used directly AFAIK 来源: https://stackoverflow.com/questions/9983787/use-chrome-engine-in-webbrowser-control-winforms

Retrieve return value of a Javascript function in the WebBrowser control in vb6

[亡魂溺海] 提交于 2019-11-29 23:06:48
问题 I have a vb6 application, I make a function call with WebBrowser script but I need to get the return value of that function my current function is v = WebBrowser1.Document.parentWindow("v = function(){return callOther();};v()"); Then, i need the v value.. the posible value is javascript function. How to retrieve "v", my test response with Error 91 (Object variable with block variable no set).. i'm beginner with vb6. 回答1: Assign return value of your JavaScript function to JavaScript variable.

Programmatically changing the destination printer for a WinForms WebBrowser control

左心房为你撑大大i 提交于 2019-11-29 22:38:40
问题 I'm trying to use an invisible WebBrowser control to print a very simple HTML document. Our application requires that we be able to print several documents this way, and that they all can be sent to different printers. Unfortunately, I haven't been very successful in making the output go to the right printer. The way it works right now is that before printing a document, the application determines which printer is to receive it, and sets the default printer accordingly. To do this it uses

Suppressing the Save/Open Dialog box in a WebBrowser control

喜你入骨 提交于 2019-11-29 22:17:27
问题 I have a WebBrowser control that is automatically logging me into a website and attempting to download CSV data automatically. Everything is working fine, except, when it tries to download the CSV data, it is popping up a dialog box, asking if I want to save the file or open it (just like in IE). What I am trying to do is automatically download the CSV file to a file of my choosing (or better, save the CSV file directly into a string variable). I can't seem to figure out how to suppress the

How to clear System.Windows.Forms.WebBrowser session data?

↘锁芯ラ 提交于 2019-11-29 20:11:43
How can I clear current session data (cookies, cached data, auth sessions, etc) without restarting the application? Update: I'm talking about WebBrowser control in Windows.Forms, not the ASP.Net session. To clear session (such as HttpOnly cookies), you can use InternetSetOption() from wininet.dll. private const int INTERNET_OPTION_END_BROWSER_SESSION = 42; [DllImport("wininet.dll", SetLastError = true)] private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength); and use this method whenever need to clear session. InternetSetOption(IntPtr