Solved

displaying very, very simple .htm files

Posted on 1998-12-29
15
142 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 121
Path  to current project in Delphi. 2 79
How to debug For loops? 3 49
how to send memory stream from ics Client To ics server ? 11 106
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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 …

770 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