Solved

Using several TWebBrowser's to display html formated text: good practice or not?

Posted on 2006-10-30
4
153 Views
Last Modified: 2010-04-05
I'm considering asking a programmer to create a delphi component based on internet explorer's TWebBrowser to easily display text by passing the html code directly to the component.

Will it consume a lot of resources or memory to display if I use a few of these components (say 6) on a single form to display basic html code?

The OS's will be Windows 2000, XP, 2003 and Vista.

Thanks!

Steven
0
Comment
Question by:smartins
  • 3
4 Comments
 
LVL 10

Expert Comment

by:wildzero
ID: 17838212
How do you mean?

Like get the TWebbrowser togo a website, grab the HTML then strip the HTML and just return the text?
If so, that is very easily done.
0
 
LVL 10

Expert Comment

by:wildzero
ID: 17838218
Infact, I would rather use something like Indy to grab the website HTML as you can trab errors better and also wont have to wait for images to load.... but thats if we are on the same road here ;-)
0
 

Author Comment

by:smartins
ID: 17838563
No, use TWebbrowser to display html text locally. Can be from a simple text with bold, links and other formating to a more complex page with images and tables.

But nothing to grab from the internet, all html code would be already included or generated by the application. The TWebbrowser would serve to display it.
0
 
LVL 10

Accepted Solution

by:
wildzero earned 100 total points
ID: 17838573
ah ok, so something like

var
  sl : TStringlist;
begin
  sl := TStringlist.create;
  sl.add('<html>');
  sl.add('<head>');
  sl.add('<title>hi</title>');
  sl.add('</head>');
  sl.add('<body>');
  sl.add('Text');
  sl.add('</body>');
  sl.add('</html>');
  sl.savetofile('C:\file.html');

  webbrowser1.navigate('c:\file.html');
  sl.free;
end;

would do it.
and sure u could have 6 doing that.
I use 1 or 2 often.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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 …

776 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