Solved

displaying very, very simple .htm files

Posted on 1998-12-29
15
143 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
ID: 1353651
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
ID: 1353652
Yes, I would just use a THTML control...

Cheers,

Raymond.
0
 

Expert Comment

by:guntherDS
ID: 1353653
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Levente
ID: 1353654
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
ID: 1353655
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
ID: 1353656
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
ID: 1353657
Looks like you want something like note tab at http://www.notetab.com/ ??
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1353658
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
ID: 1353659
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
ID: 1353660
... or did I something wrong ... ?
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1353661
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
ID: 1353662
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
ID: 1353663
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
ID: 1353664
OKidOKi then do as you think you got to do, hope it worked.
:O)
0
 

Author Comment

by:Levente
ID: 1353665
Bruintje,

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

Thank you.
Levente
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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