ActiveX Web Browser - Is this possible?

I was wondering if someone could tell me if the following is possible, and perhaps set me on the right track:
Create an ActiveX Web Browser on a form, navigate to a certain page, programatically click links on said page, programatically manipulate a drop-down box on the page, programatically click a button on the page, capture the pop-up web browser which comes up and parse the data from that browser.
I would be most grateful for any help I might receive on this matter. Thank you for your attention.
Michael Blaustein
[585 byte] By [mblaustein] at [2008-1-26]
# 1
This is definitely possible. If you're using WinForms 2.0, there is a web browser control which wraps the IE ActiveX control. You can find a good article on how to use it here.

If you're using WinForms 1.0 or 1.1, you simply have to right click on your Toolbox... Add/Remove Items... go to the COM Components tab... add Microsoft Web Browser (points to c:\windows\system32\shdocvw.dll). Drag and drop the web browser control onto your form and you're all set. Programmatically navigating, manipulating the dropdown, etc. would be much more challenging. As far as I know, the IE ActiveX control doesn't supply this functionality. You can definitely capture the resulting popup, though by listening for the appropriate event.

It sounds to me like you're trying to screen scrape some information. Unless the user needs to view the information gathering process, you probably don't need a web browser involved at all. I would recommend investigating the System.Net.WebRequest and System.Net.WebResponse objects to programmatically retrieve data from the web server.

JamesKovacs at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
James Kovacs wrote:
This is definitely possible. If you're using WinForms 2.0, there is a web browser control which wraps the IE ActiveX control. You can find a good article on how to use it here.

This is a great article, and I'm sure it will help in the first part of my application.
James Kovacs wrote:

You can definitely capture the resulting popup, though by listening for the appropriate event.

Is this done through the Windows API?
James Kovacs wrote:

It sounds to me like you're trying to screen scrape some information. Unless the user needs to view the information gathering process, you probably don't need a web browser involved at all. I would recommend investigating the System.Net.WebRequest and System.Net.WebResponse objects to programmatically retrieve data from the web server.

I'm not sure that will work, as I have forgotten to include a piece to the puzzle: The web site which is navigated to is a secure one. Thanks for your reply,
Michael Blaustein
mblaustein at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
No need to get the Win32 API involved with regard to the popup. You can capture popups by adding an event handler to the web control's NewWindow3 event, which is fired before a popup occurs. It allows you to cancel the popup or view various properties, such as the URL.

As for programmatically using WebRequest/WebResponse... Both support SSL and you can supply credentials (via webRequest.Credentials = new NetworkCredentials(user, pwd)). So if you're only using the web browser control because of this, I would re-examine WebRequest/WebResponse.

JamesKovacs at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
Hello, I believe that it is possibe to get logged in to a website using VB6 Interface, pass parameters, click the hyperlinks, extract the results and download to your PC through an automated way. Once I have heared during a lecture that probably we can do this using MS INet control (msinet.ocx). I have tried it after reading your message. But it is throwing some exceptions.

Kindly explain with some example code if anybody can. It will be highly appreciated.

Thanks.

Tiger125 at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...