webbrowser-control

How to detect when a website which uses AJAX is completely loaded?

有些话、适合烂在心里 提交于 2019-12-11 04:38:46
问题 For a website, which doesn't use AJAX I'm using OnDocumentComplete event to know when the page loading is complete. My question is, how can I detect when website, which uses AJAX requests is ready (e.g. when a website which is fetching some search results by using AJAX finished its work) ? 回答1: Ok here is a trick i developed my self. 1-in your html page make a div and set its text to "false". 2-in you server side put a javascript at the end of your returning code. for example your site

How can I make this HTML / CSS file UltraHD / 4k friendly in a CHtmlView?

人盡茶涼 提交于 2019-12-11 04:35:39
问题 I have a simple HTML / CSS file. <style type="text/css"> table { font-family: "Arial Unicode MS"; border-collapse: collapse; width: 100%; } thead tr td { font-family: "Arial Unicode MS"; font-weight: 700; font-size: 12pt; background-color: gray; } td { font-family: "Arial Unicode MS"; border-bottom: 1px black solid; border-top: 1px black solid; border-left: 2px black solid; border-right: 2px black solid; } h1 { font-family: "Arial Unicode MS"; text-align: center; } .columnStudyPoint { }

Integration of Vimeo's video in WPF

折月煮酒 提交于 2019-12-11 04:35:23
问题 We have an account on Vimeo where we display some videos for specific viewers. They are privates and we customize the ui's player to disable the share's options. The only thing that the viewer can do it's play the video. Moreover, we defined a only one specific domain where the videos can be integrated. So we have some webpages on this domain where we integrate the videos. In a webbrowser like Firefox, Chrome or Edge, if we go on a webpage hosted on this domain, there are no issue to display

Passing javascript Date object to C# WebBrowser control using window.external

自闭症网瘾萝莉.ら 提交于 2019-12-11 04:26:05
问题 I am able to call C# methods of WebBrowser.ObjectForScripting with javascript window.external from WebBrowser WinForms control and pass string , int , bool etc. However I don't know how to pass javascript Date object and somehow convert/marshal it to .NET DateTime class. Obviously, I could pass a string and parse it, but this is really not the point. I'm just curious how could I do it with javascript Date and .NET DateTime ? 回答1: You can take advantage of the fact that dates in Javascript are

How can I get a message from a specific contact?

扶醉桌前 提交于 2019-12-11 04:25:43
问题 I'd like to retrieve a message from a contact on Whats App (with user's permission, of course, I thought something like oAuth) but as far I found, what apps doesn't have an API. So I tried load the web version in a WebBrowser and get the messag from there but I can't make it work. It start loading the page to request the Qr code to be scanned but it redirects to a page saying the current browser isn't supported. So I tried to use emulation mode on IE, setting it to IE11 and changing http user

Permission denied on frame

允我心安 提交于 2019-12-11 04:07:17
问题 I have a window based on the CAxWindow. In this window I create WebBrowser control. When the DISPID_DOCUMENTCOMPLETE happens I do: void __stdcall document_complete( LPDISPATCH pBrowser, VARIANT* ) { CComQIPtr< IWebBrowser2 > wb( pBrowser ); CComPtr< IDispatch > doc; if( SUCCEEDED( wb->get_Document( &doc ) ) ) { _docs.push_back( doc ); } ... } When the page is loaded I call for each document in _docs the script (IActiveScript and IActiveScriptSite): function main( doc ) { try { return doc.URL;

Save WebBrowser control sceenshot while not in full screen

馋奶兔 提交于 2019-12-11 03:11:04
问题 I get the screenshot of a webpage contained inside a WebBrowser control just as described here and here, but I have a problem: if the WebBrowser control is not at full screen, the screenshot gets cropped to the size of the control. Is it possible to save a screenshot of the whole page if the WebBrowser control is not at full screen? This is the code I'm currently using to save the screenshot: private void SaveBrowserScreenshot(WebBrowser browser, string path, string name) { const int width =

Get file size before download it in vb

半世苍凉 提交于 2019-12-11 03:06:07
问题 I have been working on a web browser in visual basic..Now,what I want to do is to the get file size before download it and when I click download I want to to get the number of the alrady downloaded Mbs(watch the picture) Thank's for help! 回答1: I've done some research, and this would probably be the most simple and "cleanest" way of getting a download's size (in bytes): Public Function GetDownloadSize(ByVal URL As String) As Long Dim r As Net.WebRequest = Net.WebRequest.Create(URL) r.Method =

How to update DocumentText with another DocumentText

和自甴很熟 提交于 2019-12-11 03:05:24
问题 I have a Windows Form that has a WebBrowser control names formWebBrowser. I am creating a new non-UI thread with another instance of WebBrowser named newThreadBrowser. Reference WebBrowser Control in a new thread When documentcompleted event is fired I am able to write the url to a textbox using the approach mentioned in C# - Updating GUI using non-main Thread Now, I am trying to update the html of "formWebBrowser" from the html of "newThreadBrowser". It is causing exception saying Specified

WebBrowser.InvokeScript() Throws Error: 80020006

蹲街弑〆低调 提交于 2019-12-11 02:56:34
问题 I am developing a Windows Phone 8 App and i am new to Windows Phone 8. I am using WebBrowser Control and try to load the html page having javascript. On button_Click event i am calling Webbrowser.InvokeScript("JavascriptFunctionName"), but it always throws the error: 80020006, even though the WebBrowser.isScriptEnabled = true. Below is the code Html Page: MyHtmlPage.html <!DOCTYPE html> <html> <head title="test"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style