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.

Relevant Pages

  • Re: How to e-publish?
    ... that's almost entirely under my control. ... but I'm at least partly at the mercy of the viewer's browser. ... HTML is more like an Etch-a-Sketch than a professionally produced PDF. ...
  • Re: php/html editing help
    ... platform, screen setup, and browser combination, before I test it on other combinations. ... You are responsible for what you send to a browser. ... sites that are full of XHTML, but start with a HTML doctype. ... That's why we can't control things exactly like print media, ...
  • Re: Writing HTML parser wasnt as hard as I thought itd be
    ... In the HTML parsers I've written, the problem isn't even writing a parser ... recall implementing table layout for a web browser I wrote in Lisp ... So I would think it's qualitative/discrete control one wants, ...
  • Re: Lebans HTML Editor
    ... the Background color is a prop of the Document object and not the ... persistence within the HTML source. ... For detailed info on using the control see: ... >> I see that this uses the Microsoft Web Browser ActiveX control. ...
  • RE: ObjectList Data-Binding to a List
    ... Yes, mobile control is ... as most smart devices not support html and standard ... Microsoft MSDN Online Support Lead ...