webbrowser

WPF WebBrowser Silent mode through IWebBrowser2 interface not working?

I'm trying to silence Javascript errors in the WPF webbrowser control. According to the "Getting to the native IWebBrowser2" comment on this page, one can access the IWebBrowser2 interface. From there I thought I could set the Silent property to true, like this: /// <summary> /// Handle navigation events /// </summary> p...

How can I redirect to IE from other browsers?

Hi there I want to redirect to Internet Explorer from other browsers by JavaScript. How can I do that? ...

How to get the response headers while the user navigates from page to page?

I have a WPF webbrowser control which navigates the user to a registration site. After the user registers, a collection of headers are sent back alongwith the "finished registration" page. I have tried the Navigated event, and tried accessing WebResponse property in the event arguments but it's always null. Is there any other way to acce...

WebBrowser1 problem with external web app.

the external Application works good in IE so i know the problem is inside My App. The external web app is java applet and java script based, and the problem im experiensing is when the java applet tryes to run a java script. The Applet opens a seconday window with a java script and tryes to do some operations but then i just stops. And ...

Sending correct file size with PHP download script

I created a file download script in PHP, it works, but web browsers report the file as "Unknown Length". My code is as follows: function downloadFile($file){ // Set up the download system... header('Content-Description: File Transfer'); header('Content-Type: '.mime_content_type($file)); header('Content-Disposition: attachment; ...

Managing cookies in a WPF WebBrowser control?

Is there a way to read/write the cookies that a WebBrowser control uses? I am doing something like this... string resultHtml; HttpWebRequest request = CreateMyHttpWebRequest(); // fills http headers and stuff HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (StreamReader sr = new StreamReader(response.GetRes...

How browser's identify login forms?

Hi again. I'm trying to find out: how browsers identify login forms in different sites? Doesn't matter if I'm acessing my GMail account or some personal project, IE/Firefox always knows that that page contains login info. Do they conclude that simply searching for input types = password or there is some cookie information involved? T...

WebBrowser Keyboard Shortcuts

I have a WebBrowser control displaying some HTML. I want the user to be able to copy the entire document, but not do anything else. I've set the IsWebBrowserContextMenuEnabled and WebBrowserShortcutsEnabled properties to false, and I want to handle KeyUp and run some code when the user presses Ctrl+C. How can I do that? The WebBrowser ...

javascript, circular references and memory leaks

From what I recall of a not too distant past, Javascript interpreters suffered from memory leaking issues when faced with circular references. Is it still the case in the latest browsers? (e.g. Chrome, FF 3.5 etc) ...

WinForms Web Browser custom scrollbars not appearing

I'm trying to get scrollbars working with the web browser control. However, as I'll be using it to display a message for a custom messagebox, I don't want the scrollbar to appear even if its not needed - as it seems to do by default. To circumvent this I decided to disable scrollbars on the control and instead use scrollbars on another...

check if HTMLElement exists in Document in webbrowser control (vb.net)

I am trying to get the HTML inside a HTMLElement which has an id "block". I have tried: If webbrowser1.document.getelementbyid("block") isnot nothing then MsgBox(webbrowser1.document.getelementbyid("block").innerHTML) end if But it keep throwing a NullReferenceException and tells me to check if it null/nothing which is what I'm do...

Stop Dragging from a WPF WebBrowser control

I have a WPF application which contains a WebBrowser control. Currently, the user can select something within the WebBrowser and can copy the content by dragging it out to another application and dropping it there. I'd like to be able to stop the user doing this. I'd assumed that there would be a "DragStart" event that I could capture...

C# WebBrowser control: Clearing cache without clearing cookies

I have this code that clears the cache in a C# WebBrowser control. The problem with it is that it also clears the cookies. I seem to be the only person on the entire internet that doesn't want that. I need to maintain cookies, but to throw away the cache. Of particular interest is this line: const int CACHEGROUP_SEARCH_ALL = 0x0; It ...

How to Scroll a WPF WebBrowser programmatically?

In Windows Forms Applications Im using the following Code to scroll the Page inside a Webbrowser: HtmlDocument doc = webBrowser.Document; mshtml.IHTMLDocument2 htmldoc = (mshtml.IHTMLDocument2)doc.DomDocument; htmldoc.parentWindow.scrollBy(265, 20); Does anyone know how to do the same in an WPF Application (without using WindowsFor...

get the title of the active website in a WinForms webbrowser class C#

i would like to know how to find out what the current document title is of the webpage i have my browser navigate to, is this possible or will i need to open a second web request, and parse the html for a title ...

Add Source file link to the default ASP.NET Server Error page?

Has anyone ever thought to attempt to modify the default ASP.NET Server error page to provide a link BACK to the error source in Visual Studio? Consider the following standard error page in ASP.NET: Server Error in '/myproject' Application. Invalid object name 'usp_DoSomething'. Description: An unhandled exception ...

C# WebBrowser stops focus on richtextbox

Hi, I have problem with WebBrowser component. For some reason, when I click into it, it disables me from setting focus on richTextBox. I have 2 almost the same forms. Main difference between first and second form is, that form1 is modifying WebBrowser DocumentText and form2 is using webBrowser to display content of temporary file. F...

invoking a webbrowser to the second tab page visual c#

hey i am trying to create two webbrowsers on a sperate thread from the rest of the form. one goes to tabpage1 and the other is added to tabpage2. the first browser creates fine to page1 however the second browser wont add and the error "Unable to get the window handle for the 'WebBrowser' control. Windowless ActiveX controls are not supp...

How do get Java to drive/control webkit/gecko?

I want to be able to have Java to control a webkit/gecko/konqueror browser. The Java should be able to do things like "go to this url; give me the DOM tree; simulate mouse click / keyboard input on blah". What is the easiest way to do this? There seems to be some half-working solutions on the web, but no one true open source project. ...

Silverlight hosted in Winforms: Alt+Tab focus behavior

We have a WinForms window with a WebBrowser control in it, pointing to a page with a Silverlight 3 control on it. If a Silverlight control has focus and you Alt+Tab away and back again, the focus is gone. Strangely, if you do the same thing again, focus returns to where it was. I’ve tried to manually re-focus the Silverlight control aft...