Re: Opening an HTML page with VB6

Ulrich Korndoerfer wrote:

Anonymous schrieb:

I have an application that generates HTML pages and I would like to open and display the HTML page (kinda like a browser), to view the HTML page.

Can I use any of the standard controls that come with VB6 to view HTML files? (The reason I ask, is I don't want to install any custom controls on a user's machine)

VB has no standard control that displays html. You have to resort to using a "custom" control.

There is a free control available:

The HtmLayout control can be used with VB6. It is a fairly complete Html renderer, allmost all of current CSS can be used too. Standard html and CSS is supported, but there also exist custom extensions. And it has a flexible event model, including access to a DOM.

If yes (i.e. a standard VB control exists), could someone please explain how I may use it.

If no, then I will need to spawn a browser - could someone please show how I may launch a browser to open the HTML file?

- Also in the case of launching a browser, is it possible to launch it to open several pages in different tabs (this may be a tall wish since different browsers may have different cmd line options)

With HtmLayout several instances of it can be placed on one form, such tabbed browsing could be implemented.

The main benefits of using HtmLayout are:

- You have control over the renderer to be used. If you use the Internet Explorer control, you depend on the various versions of it. Because the IE is deeply integrated into a windows system, and because of Microsofts policy, the user nowadays has near to no control over the IE version and updates he wants to use.

- It has a good and fast renderer, with an extended set of CSS rules, that allows a better and easier fine tuning.

Thanks Ulrich - I downloaded the demo and tried one of the buttons (google search) - and it promptly crashed ... tnhat dosen't instill too much confidence, when a demo behaves like that - also what would have been particularly useful (especially as far as the ActiveX control is concerned - and thus for VB6 users), would be a simple Vb6 project that demonstrates either:

1). Opening and displaying an html page (should be trivial) OR
2). A very simple browser using the control (probably much more complicated)

Do you have any such examples? For me - availability of sample code as described in case 1 above would be sufficient for me to buy the control.