Solved

displaying very, very simple .htm files

Posted on 1998-12-29
15
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 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