webbrowser-control

Removing border from WebBrowser control

∥☆過路亽.° 提交于 2019-12-19 18:10:31
问题 I've got a WebBrowser control sitting on a Form which has an irritating 2px inset-looking border around it. It's causing my content to be clipped by 4 px on the right and bottom, and I can't figure out how to get rid of it. The control itself doesn't have any BorderStyle properties -- how does one remove the border? See the red area in the screen shot: Make it stop! http://img229.imageshack.us/img229/8342/badbadwebbrowser.gif I want the WebBrowser to look like the blue area -- that is, to

RaiseEvent(“onchange”)

不打扰是莪最后的温柔 提交于 2019-12-19 16:54:32
问题 I have a winform and a WebBrowser control and I am changing an option in select HTML control. webBrowser1.Document .GetElementsByTagName("select")[4] .GetElementsByTagName("option")[13] .SetAttribute("selected", "true"); Now it works and selects the required option, but it does not fire the onchange event. The select does not have an element id but it does have a class name. I tried: webBrowser1.Document .GetElementsByTagName("select")[4] .RaiseEvent("onchange"); and webBrowser1.Document

Some Elements missing while downloading from HttpWebRequest?

元气小坏坏 提交于 2019-12-19 11:57:36
问题 I am using httpwebrequest to download data from given url but few elements not coming in response. Dim Request As HttpWebRequest = CType(WebRequest.Create("https://www.royalmail.com/track-your-item#/tracking-results/37005067200003B0F1FF2"), HttpWebRequest) Request.Timeout = 2 * 60 * 1000 Request.Proxy = Nothing Request.AutomaticDecompression = DecompressionMethods.Deflate Or DecompressionMethods.GZip Request.Credentials = System.Net.CredentialCache.DefaultCredentials Dim HttpResp As

WebBrowser control auto refresh

醉酒当歌 提交于 2019-12-19 11:57:07
问题 I want to make a program in Visual Studio 2008 in Visual Basic. It involves a web browser and I want to make it auto refresh and allow people to choose the time period in which they want to auto refresh. It won't take user input but I have checkboxes that are preset. I think this may be possible using a timer and the WebBrowser1.Refresh() method. If I am mistaken, please correct me and tell me how to do this. 回答1: From what I gather, it seems that you are trying to create a WinForms

Send credentials to WebBrowser

柔情痞子 提交于 2019-12-19 10:32:24
问题 I have a webbrowser control that navigates to sharepoint port. How can i send credentials to webbrowser control, so i can navigate to the site with custom credentials? 回答1: It depends on the authentication method used by the server. For form authentication you just need to simulate a form post. But most likely the site is using integrated Windows authentication and you need to implement IAuthenticate(Ex) Or impersonate via LogonUser. 来源: https://stackoverflow.com/questions/2445963/send

How can I confirm script error dialog box into WebBrowser?

醉酒当歌 提交于 2019-12-19 09:03:52
问题 I need to confirm programatically (i.e, answer 'yes') to a script error dialog box into WebBrowser otherwise the page will stop working. I have no code to show because I have no idea how I could do this. Here's a image from dialog box I'm talking about: (take from this, btw) 回答1: According to the "How to handle script errors as a WebBrowser control host" MSKB article, you need to handle CGID_DocHostCommandHandler / OLECMDID_SHOWSCRIPTERROR command in the WebBrowser host. With a bit of coding,

Web Browser to handle pop ups within the application

落花浮王杯 提交于 2019-12-19 09:03:26
问题 I am trying to use the WebBrowser control to launch a new form for popups instead of it opening in IE. I have tried to use the AxWebBrowser instead to get the popups which works with NewWindow3 event and just doing e.ppDisp = AxWebBrowser.Application , but there are many limitations that come with AxWebBrowser. So instead I am trying to Extend the normal WebBrowser to include the NewWindow3 event like the AxWebBrowser but running into problems. With e.ppDisp = AxWebBrowser.Application I am

Is it possible to use Selenium with C# windows Form that contains a WebBrowser object?

吃可爱长大的小学妹 提交于 2019-12-19 07:20:05
问题 I'm wondering if it's possible to use Selenium with a C# Windows Form that contains a WebBrowser object. I'm using selenium and I'm able to create test cases with the Selenium script record; I'm just trying to pinpoint whether or not I can export the C# code and have it all run within a C# environment. I appreciate any thoughts or explanations. update I got to the point to have Selenium open the WinForm which contains the WebBrowser Component. However from there my test won't execute. Looks

How to capture JSON response using WebBrowser control

泄露秘密 提交于 2019-12-19 05:19:07
问题 I POST to website's JSON-response URL using WebBrowser.Navigate() . All goes well, including the webBrowser1_DocumentCompleted() event handler being called. But instead of getting a "quiet" response (e.g. webBrowser1.Document ) that I can handle programmatically, I receive a File Download dialog box: If I click the Save button and later examine the file, it contains exactly the JSON response that I expect. But I want the program capture this JSON response in-code, without displaying that

View Docx documents in WebBrowser Control

十年热恋 提交于 2019-12-19 04:03:08
问题 I've been trying for a few days now to load a word docx file into a webbrowser control that exists in a windows form c#. After struggling for days to get this done but with the help of Google and some helpful posts I've managed to do and it is beauuuuuutiful. I've done it through: Converting the docx file into a temporary html file. I navigated my webbrowser control to that temporary html document. Only that I've noticed one problem: The webbrowser control seems to view the files in Web