geckofx

savefiledialog “sometimes” throws an System.AccessViolationException

青春壹個敷衍的年華 提交于 2019-12-12 02:24:23
问题 I'm using Win7 with Visual Studio 2013 My Application is a webbrowser-component with GeckoFx. At the download-call I trigger to open the SaveFileDialog. On some cases (not on every call) I got the following error, when I call SaveFileDialog in line 822 (see also code below): System.AccessViolationException wurde nicht behandelt. HResult=-2147467261 Message=Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher

Disable JavaScript Alerts GeckoFX C#

让人想犯罪 __ 提交于 2019-12-11 12:57:44
问题 I'm trying to disable JavaScript alert in GeckoFX-33 + xulrunner 33 ( winforms c# ) but I can't find a solution. I check the example codes, source code but I just can't find something that blocks the alert out. I searched in about:config as well without success. Anybody knows where I could find a reference at last ? 回答1: In prior versions, you could do webBrowser.JavascriptError += (sender, error) => { // do something } However according to issue 7 on geckofx 33, there's some work that needs

Method to block image, flash, style when use gecko navigate?

為{幸葍}努か 提交于 2019-12-11 11:59:27
问题 I need to make a bot "get video link" from abc.. I use httpwebrequest and httprespone but I realize this website has ajax text and httpwebsite can't get it. -> I decide to use geckowebrowser Step by step 1. use geckowebrowser documentcomplete event and use navigate to website 2. use geckobutton to click and wait 5 seconds to get ajax text -> It success but too slow, it delay to load style, image, flash, etc so I try to search and I get this "DOMContentLoaded event fires when the DOM is loaded

GeckoFX with CORS support

Deadly 提交于 2019-12-11 08:02:51
问题 We have a desktop applicaton for private usage. This is build in C# and use GeckoFX for UI (HTML, JavaScript). We need to allow CORS, but we don't have control in webserver... In a previous version, we use the default WebBrowser Control, what use IE for rendering. In the IE, there is a options for allow CORS (Security Settings, Miscellaneous/Access Data Sources Across Domains) but we have to use GeckoFX insted of IE. Is there any solution to allow cross domain request in this special browser

Gecko for windows forms and geolocation. How to accept request for share my location?

耗尽温柔 提交于 2019-12-11 06:06:10
问题 My main purpose is get my current geolocation. I've tried to do it with standart control "WebBrowser" but geolocation is not supported by it. So now I'm trying to implement Gecko wrapper https://code.google.com/p/geckofx/ and xulrunner-3.6.28.en-US.win32.sdk (or xulrunner-1.9.2.19.en-US.win32) to windows forms. It perfectly navigate to any url in windows forms. But I've problems to get current geolocation in it. It doesn't give me a window to accept "share my location" as any other browser

How do I embed Developer Tools into GeckoFx web browser?

北慕城南 提交于 2019-12-11 05:44:17
问题 I'm building a developer-themed browser in a C# .NET Windows Form Application and want to allow users to use Chrome or Firefox DevTools to edit/debug the current page they are viewing . I have found several repositories online but none of them seem to be what I want. Example Chrome DevTools Example Firefox DevTools The project uses Geckofx60.64 to create an embedded Gecko web browser. I have already tried debugger.html on GitHub but that didn't help me. All I need is a simple way to show

How to get source HTML from gecko web browser? InnerHtml does not exist any more

风流意气都作罢 提交于 2019-12-11 05:35:58
问题 GeckoFx v22 GeckoElement element = null; var geckoDomElement = WebBrowser1.Document.DocumentElement; if(geckoDomElement is GeckoElement) element = (GeckoElement)geckoDomElement ; var innerHtml = element.InnerHtml; but there is no more InnerHtml method. How to get source HTML from gecko web browser? 回答1: Cast to GeckoHtmlElement instead of a GeckoElement. GeckoHtmlElement element = null; var geckoDomElement = WebBrowser1.Document.DocumentElement; if(geckoDomElement is GeckoHtmlElement) {

SaveFileDialog closes automatically directly after calling showDialog()

送分小仙女□ 提交于 2019-12-11 05:15:45
问题 I'm using Windows 7 with Visual Studio 2013. My application is a webbrowser-Component with GeckoFx. At the download-event I trigger to open the SaveFileDialog as follows. But in some cases the dialog disappears directly after callong ShowDialog() and returns a DialogResult.Cancel which jumps into the else-statement, although nobody pressed cancel. No error is thrown. Any suggestions why this happens here? I've no clue about this ... :-( 'Save file dialog Dim saveFileDialog1 As New

GeckoFX WebBrowser page height and width

让人想犯罪 __ 提交于 2019-12-11 00:00:21
问题 Does anyone know how I get the full page height and width in GeckoFX? In the IE WebBrowser object, I can look at WebBrowser.Document.Body.ScrollRectangle. (The objective here is to take a screenshot of the entire page) Thanks! 回答1: I'm using Hindle's fork of GeckoFX, and here's how I do it: var width = _browser.Document.ActiveElement.ScrollWidth; var height = _browser.Document.ActiveElement.ScrollHeight; I use this to create thumbnails of the page. Note, this gives us the size taken up by the

Embedded GeckoFx in C#.NET - WebRTC Video not working

浪尽此生 提交于 2019-12-10 23:59:18
问题 I'm just trying to embed a GeckoFX (the latest got from nuget in VS2015) engine in an Windows Forms Window (this is working) to show some WebRTC video. To embed the GeckoFx to my WinForm Test-Application I'm using the following code: private void MainForm_Load(object sender, EventArgs e) { Xpcom.Initialize("Firefox"); GeckoPreferences.User["browser.xul.error_pages.enabled"] = true; GeckoPreferences.User["media.navigator.enabled"] = true; GeckoPreferences.User["media.navigator.permission