Solved

displaying very, very simple .htm files

Posted on 1998-12-29
15
140 Views
Last Modified: 2010-04-04
Is there a simple algorithm which displays a very, very simple .htm file?
Here is a sample text, I need to display:

-----------
<p>
The <B>first</B> of <I>four</I> scheduled rendezvous burns on
<A HREF="20dec98">20 December 1998</A> at 22:00 UT aborted due to
a <B>software problem<B>. Contact was lost immediately after this and was
not re-established for over 24 hours. <BR>

The original <A HREF="mission_plan">mission plan</A> called for these for
burns to be followed by an orbit insertion burn on 10 January 1999, but the

abort of the first burn and loss of communication made this impossible.
</P>
-------------

So all I need to display is bold and itallic fonts, line breaks and
linkwords. NO
pictures, NO background images NO horizontal lines.

I've written my source code but I wonder if there is a more simple, common algorithm.

Can anyone help me (preferrably with source code or link)?

Greetings,
Levente
0
Comment
Question by:Levente
15 Comments
 
LVL 7

Expert Comment

by:ahalya
Comment Utility
i presume that you wouldn't want to use the HTML control that ships with Delphi 2.0 & above ?

0
 
LVL 12

Expert Comment

by:rwilson032697
Comment Utility
Yes, I would just use a THTML control...

Cheers,

Raymond.
0
 

Expert Comment

by:guntherDS
Comment Utility
You could save these HTML codes into a .HTML or .HTM file somewhere on the disk and then call from within your delphi source HLinkNavigatestring (Nil, 'file:<place your filename here>');  This will launch your default browser.

HLinkNavigatestring is defined in the UrlMon unit

More information can be found on:
http://www.inprise.com/devsupport/delphi/qanda/FAQ2306D.html

Another possibility is - like ahalya mentioned - use the HTML control that ships with  Delphi, or import the MS Internet WebBrowser activeX into Delphi

Good luck
0
 

Author Comment

by:Levente
Comment Utility
Thank you for your comments. The HTML control or calling an external web browser is not a good solution for me. I need to interpret special, non-standard tags so I cannot go without source. Sorry, I must reject your answer.

I'm still looking for a simple algorithm or source code concerning the displayment of very, very simple html files.

Regards,
Levente
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi Levente,

Interesting question.
It sounds like you want to make a sort of hypertext browser like the pre-netscape (mosaic) browser?

If you want to do only textprocessing I think you have to write your own parse functions, and you said that you've done that already. Don't know if there are any better but I will take a look....................

:O)
brUINTje.
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi Levente,

Interesting question.
It sounds like you want to make a sort of hypertext browser like the pre-netscape (mosaic) browser?

If you want to do only textprocessing I think you have to write your own parse functions, and you said that you've done that already. Don't know if there are any better but I will take a look....................

:O)
brUINTje.
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Looks like you want something like note tab at http://www.notetab.com/ ??
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi Levente,

I think that I got what you want, by coincidence ran across this one
http://www.ucv.edu.ve/pub/software/msdos/rtf2html.zip

it does convert a rtf file html, and it's freeware read the comments.

Hope this helps
:O)
brUINTje
0
 

Author Comment

by:Levente
Comment Utility
Sorry for the delay...

brUINTje, thanx for your answer, but i think i must reject it, since  the file you suggested does NOT include source.

Sorry,
Levente
0
 

Author Comment

by:Levente
Comment Utility
... or did I something wrong ... ?
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
I shall try to come up with an example, the source is included it's one pas file, because it's only one function.....

:O)
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
OKidOKi,

Couldn't work it out completely, the formatting in the output wasn't what I expected. But take a look at this link, it got a THTMLLite component which is free, and comes with a demo on how to use it. Maybe not quite what you're looking for, but maybe worth looking into. Don't saw the source yet.....

But you said that you're going to use special tags? So that means you want to write your parser? If that's the case you should really look into the source of the pas file I gave you earlier.
When I tried to make it work I read in the example you provided above, saw it changing in a second richedit box on screen, saved it as a .htm file and tried to read it in my browser. Only thing I saw was the example as I pasted into the first Richedit box.

I could post the code here but I really don't know if it is what you need.

:O)
0
 

Author Comment

by:Levente
Comment Utility
brUINTje,

This URL (http://www.ucv.edu.ve/pub/software/msdos/rtf2html.zip) is invalid,
though I found the file somewhere else on that site. It does NOT include .pas file.
(I might have downloaded a wrong file!?) Can you, please, pass the source you
mentioned to me (slv@freemail.c3.hu) ?

Greetings,
Levente
0
 
LVL 44

Accepted Solution

by:
bruintje earned 300 total points
Comment Utility
OKidOKi then do as you think you got to do, hope it worked.
:O)
0
 

Author Comment

by:Levente
Comment Utility
Bruintje,

Well, this is not exactly I was looking for. But I appreciate your work.

Thank you.
Levente
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now