webbrowser-control

webBrowser popup window loses session

I am using WebBrowser control of .NET to login into a website. When i click on a button that popups a new window the popup window asks me to login again. However i am not asked to login again if i open the webpage in internet explorer. Is there any way to make the WebBrowser control store session so that i do not have to login again on ...

How to make this open a webbrowser inside a new form

private void button5_Click(object sender, EventArgs e) { if (domainUpDown2.Text == "Battlefield: Bad Company 2") { Form2 form2 = new Form2(); form2.ShowDialog(); } } All that does is open a new blank form, but i need it to open a new form with a webbrowser in it so i can set it url depende...

How to make c# form mirrored?

Hello, I have some text in a web browser on my form in visual studio, this form is going to be displayed on a big screen and it's content need to be mirrored(flipped) in order to be seen on the other place through mirror. It is not rotation actually. I know it is possible to do it with images, but it is not applicable in my case, becaus...

Why is C# winforms application not working without VS.NET installed?

Hi folks, I have a winforms c# app that has an embedded webbrowser control inside it generated through VS.NET 2008. We sink events by inheriting our events class from HTMLDocumentEvents2. public class IEHTMLDocumentEvents : mshtml.HTMLDocumentEvents2 { public bool onclick(mshtml.IHTMLEventObj pEvtObj) { // Clicki...

Save WebBrowser Control Content to HTML

I have a WebBrowser Control and have called the Navigate(url) function of it for a given file. Then I have manipulated the DOM tree by giving new Id's to some of the tags. Now I want to save the result in an HTML file. I have tried to use the webBrowser.DocumentStream, but it seems that this stream won't change after manipulating the DO...

Winforms WebBrowser tell when done Refreshing

I have a page that refreshes every 20 seconds and I need to know when it is done refreshing, the DocumentCompleted event does not fire when you refresh for some reason. Any ideas? ...

Opening web page within existing web page

I need to be able to load web pages from different sites within a page on my site. I am using C# .NET and master pages. Within the content page, I want to be able to load an arbitrary page and display it without any of the browser controls appearing - just the page content. ...

Adding a search box to a windows forms web browser control that highlights text

I have a windows forms (using c#) application. It displays a webpage and has a textbox/botton combination which can be used to search for text displayed to the user. Currently I search the inner text of all elements for the text in the textbox. And then I weed out the elements that are redundant (for example a word could be in a 'p' and ...

Disable Images, ActiveX Etc in VB6 WebBrowser control using DLCTL_NO_

Like the title says, i want to disable images, and ActiveX Controls in the vb6 webbrowser control using DLCTL_NO_RUNACTIVEXCTLS and DLCTL_NO_DLACTIVEXCTLS Microsoft talk about it here: http://msdn.microsoft.com/en-us/library/aa741313.aspx But i dont see any way to access IDispatch::Invoke from the vb6 application. Any help would be gr...

C# - WebBrowser control seems to cache screenshots

Hey, I'm using the WebBrowser control in an ASP.NET MVC 2 app (don't judge, I'm doing it in an admin section only to be used by me), here's the code: public static class Screenshot { private static string _url; private static int _width; private static byte[] _bytes; public static byte[] Get(string ...

How to get selected text from a webpage?

I need to retrieve only selected portion of a webpage (user open a webpage in web-browser control, then he/she would select some portion of a webpage, i just need only those selected portion/text) in vb.net in visual basic language. How to do ? i am using microsoft visual studio 2008 Language: Visual Basic FrameWork: vb.net 3.5 ...

Display PDF from a stream in a WebBrowser control

How can I display a PDF document from a MemoryStream within a WebBrowser control? I've searched around and found I can simply navigate to a PDF file using: webBrowser1.Navigate(@"C:\Temp\ExportedPDF.pdf"); However I want to avoid saving the file anywhere, but I'm currently leaning towards using IsolatedStorage simply because I can't ...

Convert my aspx page to png image

I am generating an aspx page which then I need to convert to png and store it somewhere. A similiar situation with mine was asked before here but got still no response. I tried also the code that the Swapnil Fegade has asked but the code is looping continually making request to loading page and no conversion is actually being done. I ...

What is the Browser version of a WebBrowser control in Windows Forms

I'm building a Windows Forms application which makes use of the WebBrowser control. Can anyone tell me what rendering engine the control uses? Is it fixed based on the version of the .NET framework I'm developing against or is it based on the version of IE installed on the client's machine? Does the client even need IE? In other word...

Feeding PDF through IInternetSession to WebBrowser control - Error

As related to my previous question, I have developed a temporary asynchronous pluggable protocol with the specific aim to be able to serve PDF documents directly to a WebBrowser control via a database. I need to do this because my limitations include not being able to access the disk other than IsolatedStorage; and a MemoryStream would b...

how to convert windows forms browser control's document object to mshtml.IHTMLDocument2

Trying to get this line to work mshtml.IHTMLDocument2 doc2 = webBrowser1.Document as mshtml.IHTMLDocument2; but getting the error message Error 10 Cannot convert type 'System.Windows.Forms.HtmlDocument' to 'mshtml.IHTMLDocument2' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type co...

Viewing a TIFF stream using the .NET webbrowser control in C# doesn't show image...

I have a windows form that is using a Webbrowser control to view documents on a web server. When it tries to display a TIFF, it just displays a blank screen. It works with other file types just fine. The URL to the TIFF works fine if I paste it into Firefox. Will this flat out not work, am I doing something wrong? Should I invest in a...

Disable caching in System.Windows.Forms.WebBrowser

I am maintaining a .NET 2.0 application that uses a System.Windows.Forms.WebBrowser to display reports from Reporting Services 2005. Caching is disabled for all reports on the server, and this seems to work as expected. The problem is that the WebBrowser control insists on checking Temporary Internet Files for a cached copy of the repor...

WinForm WebBrowser Control slow to load. Best Method for pre-loading?

We have a summary view in our winform app that uses a WebBrowser control to display the summary information from a web page. We are using this to gain some rich tabular layout that we could not accomplish using standard winform controls. the first time the view is displayed on the client it takes a while to spin up (launching IE in the...

Hosted WebBrowser control attempts to download Flash content rather than playing it

I am hosting an IE browser control in a simple, .NET winforms app. When I make the control navigate to certain content on disk, the control attempts to download the file (rather than displaying the content.) The exact same URL when pasted into the IE browser will properly display the swf file in question along with processed XML data th...