Solved

displaying very, very simple .htm files

Posted on 1998-12-29
15
141 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
Syntax Check Delphi Seattle IOS app without MAC ? 1 92
Delphi: how to implement a User Shortcut mapper? 1 95
Downloading email attachments 2 67
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…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

12 Experts available now in Live!

Get 1:1 Help Now