Solved

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

Posted on 2006-10-30
4
151 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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