webbrowser-control

How to enable special keys (ctrl-c, ctrl-v, tab, delete) Windows.Form.WebBrowser Control

◇◆丶佛笑我妖孽 提交于 2019-12-06 13:23:26
I have a Window.Form that has a WebBrowser control on it. How do you enable the control to process special keys like the Tab key for navigating between controls? I've seen answers for doing this in activeX and mfc controls but not for the .NET control. Thanks The Windows.Forms WebBrowser control is a wrapper on the activex control. You have the property WebBrowserShortcutsEnabled ( MSDN Link ), however, that should be true by default. 来源: https://stackoverflow.com/questions/10435092/how-to-enable-special-keys-ctrl-c-ctrl-v-tab-delete-windows-form-webbrowser

WebBrowser control and Windows 10 issue (Navigation canceled)

本秂侑毒 提交于 2019-12-06 12:37:22
问题 I'm trying to run a WebBrowser containing form on a new STA thread. The code runs as expected on Windows 7, but on Windows 10 the navigation cancels automatically. I tried to set each of the zone security settings to minimum from Internet Options but nothing changed. Navigation to the webpage was canceled Zone: My Computer | Protected Mode: Off res://ieframe.dll/navcancl.htm#https://google.com/ This page can’t be displayed Zone: My Computer | Protected Mode: Off res://ieframe.dll

C# WebBrowser component ignores window.location.href = url

我与影子孤独终老i 提交于 2019-12-06 12:33:56
I'm trying to make asp.net mvc application to be shown in c# webbrowser component. Everything works fine except file downloading. In this mvc application there is a lot of side components, so there was found no other way to handle downloadFileLink but to use following JS: function downloadButtonClick(s, e, buttonID, actionUrl) { var downloadUrl = actionUrl + '?FileID=' + s.GetRowKey(e.visibleIndex); if (e.buttonID == buttonID) { window.location = downloadUrl; } } this approach works fine while I'm trying to download file by this link using any browser, except webbrowser component. It seems to

Using WebRequest cookie in WebBrowser

孤街醉人 提交于 2019-12-06 12:31:32
问题 I want to login to a site using WebRequest and later show site (logged) in WebBrowser . But how to "copy" WebRequest cookie into WebBrowser ? Thanks in advance, Kacper 回答1: use cookie collection to grab cookies, I've write something similar this month and I can share you some sample code: static string GetFromServer(string URL, ref CookieCollection oCookie) { //first rquest // Create a request for the URL. HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(URL); request.UserAgent

Save webpage using webbrowser control

我们两清 提交于 2019-12-06 12:28:31
I am using VB6 and the webbrowser control to navigate to to webpages. I want to save the pages I visit in regular intervals without any manual intervention. I know how to parse HTML using DOM. But also need to save the pages without dispaling any dialog box. Is this possible? Will appreciate some help. Thanks. Tawfiq. MarkJ This Microsoft KnowledgeBase article (Q244757) says there's no way to do this with the Web Browser control, but gives an alternative solution using UrlMon.dll, which I've put below. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ "URLDownloadToFileA" (ByVal

communication between 2 browser windows in electron

假装没事ソ 提交于 2019-12-06 11:24:32
I need to build an app that will span across multiple monitor screens, something like this: Electron suports multiple windows but how to comunicate between them? The main thing to remember is that in Electron, interProcess communication is done by ipcMain (in the main process) and ipcRenderer(in all the created windows). Like below: From what i've seen in the GitHub comments - direct communication between the Renderer instances is not allowed. Everything must pass trough the mainProcess. the code: mainProcess.js: function createWindow1 () { window1 = new BrowserWindow({width: 800,height: 600})

WebBrowser control video element enter fullscreen

不羁的心 提交于 2019-12-06 10:55:36
In my project, I have a WebBrowser control with a video element and I want to insert a button that when I press it, the video element will switch to fullscreen mode. I tried this code: var video = document.getElementById('video'); if (video.requestFullscreen) { video.requestFullscreen(); } else if (video.mozRequestFullScreen) { video.mozRequestFullScreen(); } else if (video.webkitRequestFullscreen) { video.webkitRequestFullscreen(); } And it won't work. I read in some article that it's not possible in IE browser to make video element enter fullscreen. Is there any fix for this? Did I do

WebBrowser Control (MFC) created in seperate thread working in Windows 7 and Vista, but Windows XP

若如初见. 提交于 2019-12-06 10:48:06
I have CWnd in main thread, and a CWnd with a WebBrower control created in a seperate thread. This is necessary, because the WebBrowser navigates to urls which have javascripts running which will block the WebBrowser. So I with the WebBrowser control in a seperate thread I prevent the GUI Thread vom hang. Also I have done this in main thread in my application: CCustomOccManager *pMgr = new CCustomOccManager(); AfxEnableControlContainer(pMgr); That's for extending the WebBrowser control to my on "window.external" interface. The seperate thread mechanism works fine in Windows 7 and Vista. But in

How to grab the Contents Which updated by JavaScript WebBrowser

£可爱£侵袭症+ 提交于 2019-12-06 10:41:24
private void button1_Click(object sender, EventArgs e) { webBrowser1.Navigate(textBox1.Text); } private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WebBrowser web = (WebBrowser)sender; richTextBox1.Text = web.DocumentText; } above is sample code. it's giving all Text of Current Open, if contents is updated by JavaScript, it visible but Document.Text not update. Please Help guys Mohammadreza I had the same problem. Use the following sample code: IHTMLDocument2 doc = webBrowser1.Document.DomDocument as IHTMLDocument2; string content = doc.body

What is the best way to embed Excel in c# application [closed]

元气小坏坏 提交于 2019-12-06 10:32:20
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed last year . I want to embed MS Excel into my wpf C# application within a tabbed view, so that the user can utilise the real MS Excel (not a clone) to manipulate data generated within my application easily. What is the most effective way to embed Excel / Office applications into your .net application going forward. Is it: 1) Webbrowser 2) ActiveX (commercial or try to fix DSOFramer from 2008) 3