geckofx

How can I get the HTML5 GeoLocation feature to work on GeckoFX v22 web browser control for WinForms using C#?

瘦欲@ 提交于 2019-12-10 21:50:34
问题 I wanted to implement a web browser control to Geo-location enable my WinForm desktop application. I have successfully implemented the GeckoFX web browser in my WinForm project. The problem is when visiting a HTML5 Gelocation enabled website/address the "Allow/Deny access" popup does not appear. As a result the Geo-location does not work. I have confirmed that Geo-location is enabled in preferences and have tested my WinForm using http://html5test.com and the control is listed as supporting

Disable GeckoFX confirm messages

不想你离开。 提交于 2019-12-10 11:33:43
问题 I am using Gecko Web browser version 21.0.1 and .net Framework 4.0 in my windows application. When I navigate to certain web pages I get Pop up confirm message: This web page is being redirected to a new location. Would you like to resend the form data you have typed to the new location? How can I disable this kind of messages? So far I have tried the following settings, but they didn't help: GeckoPreferences.User["security.warn_viewing_mixed"] = false; GeckoPreferences.User["plugin.state

How to access nsIHTMLEditor interface in GeckoFX?

耗尽温柔 提交于 2019-12-08 00:27:11
问题 I am trying to make a WYSIWYG HTML-editor by embedding GeckoFX in a Windows Forms application in VB.NET. The code goes like this: Dim Gbrowser As New GeckoWebBrowser Gbrowser.Navigate("about:blank") ... Gbrowser.Navigate("javascript:void(document.body.contentEditable='true')") How can I activate and access the nsIHTMLEditor interface from within my application? Thank you. UPDATE This code does not work: Dim hEditor As nsIHTMLEditor hEditor = Xpcom.GetService(Of nsIHTMLEditor)("@mozilla.org

How to call C# method in javascript by using GeckoFX as the wrapper of XULRunner

我怕爱的太早我们不能终老 提交于 2019-12-07 04:53:19
问题 I am using GeckoFX16 and xulrunner-16.0.2.en-US.win32 in my project. The thing is, I want to call a C# method in javascript. I am curious, is there a way to do this? Just like below: C# part: private GeckoWebBrowser weBrowser; public browser() { InitializeComponent(); Gecko.Xpcom.Initialize("xulrunner"); weBrowser = new GeckoWebBrowser(); weBrowser.Parent = this; weBrowser.Dock = DockStyle.Fill; weBrowser.Navigate("test.html"); } public string loadData(){ //load data from local file. return

Using GeckoWebBrowser (v45.0.34.0) in a VB.NET project

早过忘川 提交于 2019-12-06 13:49:19
I am trying to make GeckoWebBrowser (version 45.0.34.0) control to work into my VB.NET project with no luck!!! Here is the steps I follow... 1. I do right click on my project into Solution Explorer list and then Manage NuGet Packages . 2. I find and install Geckofx45. 3. Then I go into my Project's properties , into Compile tab and I change Target CPU to x86 . 4. I Rebuild my project. 5. Then I add GeckoWebBrowser control into my Toolbox by selecting the Geckofx-Winforms.dll file from ...\packages\Geckofx45.45.0.34\lib\net45 folder. 6. I add a GeckoWebBrowser control into my form and just for

Setting cookies for the GeckoFX web browser?

断了今生、忘了曾经 提交于 2019-12-06 13:17:26
问题 How do you set the cookies for the Gecko web browser? I know that I have to call: geckowebbrowser.Document.Cookie = ...; but you need to set the cookies globally too. For example, in the .NET included Microsoft IE WebBrowserControl you set them by using the following Winapi function: static extern bool InternetSetCookie(string lpszUrl, string lpszCookieName, string lpszCookieData); This works fine for IE Web Browser but not for Gecko. I've tried to use the Cookiemanager class from the Gecko

Disable GeckoFX confirm messages

纵然是瞬间 提交于 2019-12-06 12:19:55
I am using Gecko Web browser version 21.0.1 and .net Framework 4.0 in my windows application. When I navigate to certain web pages I get Pop up confirm message: This web page is being redirected to a new location. Would you like to resend the form data you have typed to the new location? How can I disable this kind of messages? So far I have tried the following settings, but they didn't help: GeckoPreferences.User["security.warn_viewing_mixed"] = false; GeckoPreferences.User["plugin.state.flash"] = 0; GeckoPreferences.User["browser.cache.disk.enable"] = false; GeckoPreferences.User["browser

C# combining GeckoFX + Tor.NET libraries

旧时模样 提交于 2019-12-06 09:56:35
问题 I am trying to combine GeckoFx library and Tor.NET library. In my code I do all preparing to use tor network, ClientCreateParams createParameters = new ClientCreateParams(); createParameters.ConfigurationFile = ConfigurationManager.AppSettings["torConfigurationFile"]; createParameters.ControlPassword = ConfigurationManager.AppSettings["torControlPassword"]; createParameters.ControlPort = Convert.ToInt32(ConfigurationManager.AppSettings["torControlPort"]); createParameters

How to access nsIHTMLEditor interface in GeckoFX?

孤街醉人 提交于 2019-12-06 04:37:53
I am trying to make a WYSIWYG HTML-editor by embedding GeckoFX in a Windows Forms application in VB.NET. The code goes like this: Dim Gbrowser As New GeckoWebBrowser Gbrowser.Navigate("about:blank") ... Gbrowser.Navigate("javascript:void(document.body.contentEditable='true')") How can I activate and access the nsIHTMLEditor interface from within my application? Thank you. UPDATE This code does not work: Dim hEditor As nsIHTMLEditor hEditor = Xpcom.GetService(Of nsIHTMLEditor)("@mozilla.org/editor/htmleditor;1") hEditor = Xpcom.QueryInterface(Of nsIHTMLEditor)(hEditor) hEditor.DecreaseFontSize(

how to hide scrollbar in gecko webbrowser control in c#

一世执手 提交于 2019-12-05 20:00:18
i am trying to hide scrollbar of GeckoFx WebBrowser control,in Windows forms there is method to hide scrollbar webBrowser1.ScrollBarsEnabled = false; but in GeckoFx Webbrowser there is no property like that i am using Navigate Method geckowebbrowser.Navigate("Url"); This works. You can create your own ScrollBarsEnabled property if you want. webBrowser1.Document.Body.Style.CssText = "overflow: hidden ! important;"; 来源: https://stackoverflow.com/questions/21024819/how-to-hide-scrollbar-in-gecko-webbrowser-control-in-c-sharp