webbrowser

Handling key events on WebBrowser control

I am using the WebBrowser control in a C# application and want to handle all key events while the WebBrowser has the focus, regardless what individual content element (input field, link, etc.) is focused. I tried to simply add an event handler to browser controls KeyDown event, but this does not work. I don't want to explicitly hook a ...

PostBack event not firing in WebBrowser Control

In our client application making use of the .NET WebBrowser control, about 1% of our users are reporting no-action when clicking on an ImageButton, LinkButton, or any ASP.NET control that submits its request via DoPostBack(). When the same users access the page directly in IE, the controls behave normally. What could be causing the dis...

Implementing Folder Explorer with webbrowser C# winform

Hi, I' trying to use webbrowser to create a folder explorer and I have few problems that I could not find any answer on the web... so I’ll appreciate your answers: Can someone please explain how can I create the Up button (going to parent folder)? How can I the explorer bar (on the left) to favorites or search as in windows explorer? ...

HTML - How do I know when all frames are loaded?

I'm using .NET WebBrowser control. How do I know when a web page is fully loaded? I want to know when the browser is not fetching any more data. (The moment when IE writes 'Done' in its status bar...). Notes: The DocumentComplete/NavigateComplete events might occur multiple times for a web site containing multiple frames. The browse...

Need to force open IE from safari browser while opening a new popup

Is it possible to open a pop up from a Java page which is on Safari browser to open a popup in IE browser. I think it is not possible. ...

Delphi, TWebBrowser and IE8 -> application freeze on closedown

In our applications, we display a webpage in a TWebBrowser component. After installing IE8, some of our application started to stop responding on closedown. We have found the following to be true: It only freezes if the webpage have been shown Which application that freeze, depends on what url is shown. If we switch url between two a...

WebBrowser Control - Console Application - Events Not Firing

I have been navigating the various WebBrowser control stackoverflow questions, and I can't seem to find an answer to a problem I am having. I am trying to use the WebBrowser control to print a web page. Following MSDN's example, I have created the following console application: namespace WebPrintingMadness { using System; using ...

How to enable Menu Bar in Embedded Word

I am able to successfully embed the Web Browser Control in a Windows Forms application to load a Word Document. I am able to turn on the "Standard" Toolbar so that it shows. However, I am not able to display the Menu bar. The following snippet shows what I am doing: _wordDoc.CommandBars["Menu Bar"].Enabled = true; _wordDoc.CommandBars["...

How do I save a web page to image (using C#)

I have a WebBrowser control and I want to save the whole page viewed to image (any web page). I tried using IHTMLElementRender interface but it didn't work for all web pages. Maybe I'm doing something wrong because sometimes the snapshot included the scrollers and sometimes it was just partial. Do you have a working example that can save...

How to force Webbrowser component to always open web page in the same window?

Hi, I need to use webbroser in my application as it keeps repetitive tasks from employees, but there is aproblem with javascript that opens a new window in IE after clicking on anchor. How do I tell webbrowser component to "open new window" where I want it to be opened? For example in the other webbrowser component? ...

C#: Best way to inject CSS into MSHTML instance?

Hey everyone, I'm trying to inject some CSS that accompanies some other HTML into a C# managed WebBrowser control. I am trying to do this via the underlying MSHTML (DomDocument property) control, as this code is serving as a prototype of sorts for a full IE8 BHO. The problem is, while I can inject HTML (via mydomdocument.body.insertAdj...

How do I get a web browser to refresh automatically?

Say I want to run a simple Python script that is a web server. And I want to connect a browser to it that refreshes every N seconds, i.e. so the page is updated. How would I do that? I assume the Python server script would generate some HTML that contains javascript that sleeps and forces a refresh? Or can the browser force a refresh? ...

C# WebBrowser control not firing the DocumentCompleted event

I have a program that is using the C# WebBrowser control and it needs to detect which page is loaded to determine what to do next. The program works fine on most of the employee's computers at the office, but it does not work on some. I have determined the problem is that the documentCompleted event is not firing on those computers it ...

Using .Net Web Control - How to Set a Value in a TextBox *INSIDE* of an IFRAME.

I'm trying to use a .Net WebBrowser control to log into a website and aggregate some data for me. I'm also using a reference to MSHTML (but I don't care if your solution does or doesn't). When I visit a 'normal' website - I create an mshtml.HTMLDocument from the webBrowser's .documment. Then I create a mshtml.FormElement and a mshtml....

WebBrowser Control: Is there a good documentation on browsing local files and folders?

I am using the WebBrowser control to browse local files and folders, but the control seems to be designed primarily to browse the Web (as its name implies). I need to be able to do common tasks, like using the "Up one level" button, or put the control in "File Search" mode, get the active item, etc. Is there a way to do these things u...

How do I force a browser window to always be on top and in focus

Is there a way to force a browser window to always be on top and in focus? I am working on a project that I need to have the browser window on top and in focus all the time except when closing the browser window. I have tried a few things through javascript, but have not had any success keeping the window in focus. I am not trying t...

Internet Browsers

I have internet explorer and Firefox and i am setting firefox as my default browser. If i open a .html or .mht file in which browser will that file open Where in the registry the changes regarding the default browser will be made ...

How to save xslt applied xml file in .net compact framework webbrowser in PDA

Hi please help me for windows mobile ... I am using stylesheet in an xml file and load this xml file into webbrowser control in PDA application made in C#(.net 2.0 compact framework) . Now I want to save this xml file with changed node value with same or diffent file name. Javascript for document.write is not working in PDA. WebBrowser c...

Do valid web pages load faster?

I am a fan of valid web pages and always spend time passing new sites through the W3C validator. When trying to make a case for why companies should validate web pages I quickly thought of accesibility and the future-proofing of the web site on more primitive devices such as phones, fridges, watches, the next-big-thing etc. However I t...

What is the difference between an F5 (refresh) of a page and pasting that URL in a new window?

What is the difference between an F5 (refresh) of a page and pasting that URL in a new window and clicking enter? Any help is appreciated ...