Re: Converting a userspecific VCL-component to an ActiveX-control

From: Ulrich Korndoerfer (ulrich_wants_nospam_at_prosource.de)
Date: 01/20/05


Date: Thu, 20 Jan 2005 01:45:38 +0100

Hi,

Bjørge Sæther wrote:

> I didn't understand what you want this for:
>
> - Render HTML into a visual representation in a Windows application, or
> - Use Windows controls for displaying in a browser ?

The first one of these two.

I will write a standard windows desktop application.

One part of this application shall be a control being able to render
HTML. This control will be placed on a window. User chooses to display
some data, I fetch this data from a database, embedd this data into HTML
code and give this HTML to the control for rendering.

The second part shall be building parts of the applications user
interface with HTML. Think of it like doing traditional dynamic HTML.
The differences between traditional dynamic HTML and my approach are:

- trad. DHTML for implementation of behaviour uses client side scripting
with scripts embedded in the HTML. The script code is extracted by the
browser and given to a script interpreter. The interpreter then executes
this code. Also the interpreter has access to the DOM of the HTML, such
allowing modification of the HTML code through the script. Code
execution is triggered by events (user events, timer events, or doucment
events like document loading, showing and so on).

- In my approach behaviour is implemented using events (or callbacks,
notifications or whatever you like to name it) too. The renderers part
is it to give the application which embeds it these events. An event can
be as simple as saying "a link has been clicked". Or "mouse has hovered
an image". But the events then trigger execution of code which is
application code, right compiled into the application. The advantages of
this are: the renderer may be much more simpler as a full fledged
brwosing component like IE or Mozilla control. It is much faster than
interpreted script code as application code is compiled to native
assembler code. And I gain much more control and flexibility than with
trad. DHTML.

Also my approach allows (if the renderer supports it, which ThtmlViewer
does) to embed classic windows controls (like a listview, treeview and
the like) in the visual representation of the HTML. The renderer takes
care of the positioning and sizing of the control and takes its
existence into account when rendereing the rest (such eg. text will flow
nicely around an embedded control, or automatic reaction on windows
resizing can be achieved with no extra effort on the applications side).

-- 
Ulrich Korndoerfer


Relevant Pages

  • [Full-Disclosure] Que es mas macho, SCRIPTES o TABLESPOON?
    ... Express renders plain text messages. ... HTML, ... separate plain text renderer, but use its HTML renderer instead, by converting ... disabling the HTML encode filtering. ...
    (Full-Disclosure)
  • Re: xp2 activex object not displayed in html
    ... Allow active content to run in files on My Computer - Windows XP Service ... I have an activex control displayed as an object in an html page. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: efficiency of JList setElementAt()
    ... If you modify your program to produce strings about 3 times as long, make the strings HTML with a font color tag, and increase the list size to about 130, I think you'll get the kind of results I cited in my first post. ... The Swing cell renderer design is based on assumptions that construction is expensive and updating values is cheap. ... So let's cache. ...
    (comp.lang.java.gui)
  • Html Rendering in Winforms
    ... I am facing a problem with the rendering of html into a windows ... control so far. ...
    (microsoft.public.dotnet.languages.csharp)
  • Html Rendering in Winforms
    ... I am facing a problem with the rendering of html into a windows ... control so far. ...
    (microsoft.public.dotnet.framework)