webbrowser-control

How to delete Cookies from windows.form?

☆樱花仙子☆ 提交于 2019-12-17 02:46:26
问题 I am working with the Webbrowser control on a windows.form application written in C#. I would like to write a method for deleting the cookies from the Webbrowers control after it visits a certain site. Unfortunately, I don't know how to do that exactly and haven't found a lot of help on the internet. If anyone has experience actually doing this, not just hypothetical because it might be trickier than it seems, I don't know. int count = webBrowser2.Document.Cookie.Length; webBrowser2.Document

Silverlight 4 OOB application access HTML DOM of the page in WebBrowser control

我怕爱的太早我们不能终老 提交于 2019-12-14 03:57:22
问题 Does anybody know if it is possible to access and manipulate an element in the html page that is rendered by the Silverlight 4 WebBrowser control. The scenario is like this. The user launches a Silverlight OOB application with elevated trust. The user manipulates some data in the application but must submit part of the data to an external web site. If I open the external site in a WebBrowser control, is there any way I can assist the user by pre filling some information in the external sites'

A way to redirect keypresses from TWebBrowser to the ParentForm

坚强是说给别人听的谎言 提交于 2019-12-14 03:56:56
问题 First question. Help format it, if needed, please. Context I have a TWebBrowser in the main form that is used to behave like it was a printer. So I load some HTML text in it as user do some commands in the real printer... I want the user to be able to click and select text from the WebBrowser. Problem When the user clicks in the WebBrowser some of the shortcuts registered from the actions don't work anymore. For example, there is an action with shortcut F7 . If the user clicks in the

Plenty exceptions when using webbrowser control c#

依然范特西╮ 提交于 2019-12-14 03:36:22
问题 I am using webbrowser-control to display multiple webpages in a C# form. Several webpages are giving me 100+ errors like: First-chance exception Microsoft C++ exception: Js::JavascriptExceptionObject at memory location xxx How can I catch or suppress these exceptions? There are so many my program is crashing. 回答1: You can suppress JavaScript errors by setting the WebBrowser1.ScriptErrorsSuppressed =True 来源: https://stackoverflow.com/questions/24806185/plenty-exceptions-when-using-webbrowser

Flash SWF file cannot find XML data file when loaded into WebBrowser control (but works in IE9)

自闭症网瘾萝莉.ら 提交于 2019-12-13 22:09:51
问题 Bit of a long explanation below, with a hopefully accurate short question summary here: Can a .NET WebBrowser control (Win7 64-bit, IE9, current Flash 10.3.183.7) load a SWF file into an <object> tag, where the SWF file is in a separate folder that also contains an XML data file in such a way as to have the SWF file load and display the XML data? UPDATE : Added some more information below based on some further experimentation... Gory detail: This has plagued me for a couple of days. Consider

Reset Webbrowser control to update settings

早过忘川 提交于 2019-12-13 20:58:42
问题 I want to use C# with a webbrowser control to switch between the Show pictures option of IE, without needing to restart my application. My current solution //THE REG FILE: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Display Inline Images"="yes" The reg file is then executed from my c# project. System.Diagnostics.Process regeditProcess = System.Diagnostics.Process.Start("regedit.exe", "/s imagesON.reg"); regeditProcess2.WaitForExit(); the

Retrieve base URL path to be used in download image, CSS and javascript files from web page

我的未来我决定 提交于 2019-12-13 19:51:30
问题 We are downloading web page linked Images, style sheet(.css) and javascript files using web browser control (IWebbrowser2 and IHTMLDocument interface) ATL win32 application. Now for some of the web page image src= "/images/a1.jpg" are relative, so we need to append a base host address to the location and download. Do we have any method to get the base host address URL path to be append into image path. or any good parser to extract that? Thanks, Ramanand Bhat. 回答1: Does IWebBrowser2:

Difference between Refresh and Navigate function in browser control?

非 Y 不嫁゛ 提交于 2019-12-13 18:21:50
问题 Yesterday I came across one of the sites that uses to display the "Views"(i.e.the no of persons visited the page).When I clicked the refresh button the count started increasing. Then I wrote this small application to increase the view count. browser = new WebBrowser(); for (int index = 0; index < 250000; index++) { { browser.Navigate("url"); System.Threading.Thread.Sleep(100); } } I reported the bug and they have rectified it.Now even if I press the F5 button the view count won't increase.But

wpf webbrowser control and google maps, overlays gray image

大憨熊 提交于 2019-12-13 18:01:59
问题 I have been using the webbrowser control in c# to render google maps for a long time. Recently, google maps now loads up and then a gray box is overlaid. See the image http://www.condoresorts.com/Debug/webdebug.png Anyone have the slightest idea what would cause this? this.webBrowser1.DocumentText = @"<iframe width=""425"" height=""350"" frameborder=""0"" scrolling=""no"" marginheight=""0"" marginwidth=""0"" src=""https://maps.google.com/maps?f=d&source=s_d&saddr=Oklahoma+City,+OK&daddr=texas

Windows Phone 7 WebBrowser control swallows manipulation events?

强颜欢笑 提交于 2019-12-13 13:13:56
问题 If I place a WebBrowser control on any page, the page no longer responds to manipulation events under the WebBrowser. Other areas of the page work fine. It's easily confirmed by overriding OnManipulationCompleted in a page, then placing a WebBrowser control on the page. Try swiping over the WebBrowser, and OnManipulationCompleted is never called. I can't set the WebBrowser to IsHitTestVisible=false because I need to be able to click on links. But I want the page to respond to left/right