Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Simple web-browser

Posted on 2000-05-15
9
Medium Priority
?
249 Views
Last Modified: 2010-04-04
Hi. Can anyone send me a source of very simple web-brovser. (I don't want to use TWebBrowser component) Also i want to know, how can i add some function that downloads images.
0
Comment
Question by:saulite
[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
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 2811980
>I don't want to use TWebBrowser

Why not?
0
 
LVL 4

Expert Comment

by:mhervais
ID: 2812215
listening
0
 
LVL 1

Author Comment

by:saulite
ID: 2812561
Simonet.
It's a stupid Internet Explorer. I want to add my own effects, because i need to built my own browser. OkOk. I actually don't need source of displaying images. I just want to know how to download them.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:saulite
ID: 2812883
Edited text of question.
0
 

Expert Comment

by:doncov
ID: 2813463
1. Look example from Delphi5 \Demos\CoolStuff.
2. Article -
http://www.delphizine.com/features/1998/08/di199808rl_f/di199808rl_f.aspAccessing the DOM from Delphi
The first step to accessing the DOM from Delphi is to import the interfaces defined in the INetSDK. Unfortunately, Delphi 3's Typelib import command cannot handle mshtml.dll where the interesting interfaces are defined. You'll need to download the 3.02 update from INPRISE's Delphi updates Web page (Maintenance release 2) and apply it on top of version 3.01. One of the modules installed by this release is tlibimp.exe in the \bin subdirectory of Delphi's installation. You'll need to execute this program from the command line and import mshtml.dll to create mshtml_tlb.pas. This file includes most of the interesting interfaces you need to access the DOM.

 

The IHtmlDocument2 interface is your entry point into the DOM. The WebBrowser control exposes this interface via the Document property. The following code will retrieve the interface in Delphi:

 

Document := WebBrowser.Document as IHtmlDocument2;
 

where Document has been defined as a variable of type IHtmlDocument2.

 

Assuming you have some content in the browser control, you can now start accessing the DOM and access the document's content. The code in Figure 4 accesses the document and prints all the tags found in the content to a memo control. It uses the IHtmlElementCollection and IHtmlElement interfaces.

 

procedure TForm1.Button2Click(Sender: TObject);
var
  All: IHtmlElementCollection;
  HtmlElement: IHtmlElement;
  i: Integer;
begin
Document := WebBrowser.Document as IHtmlDocument2;
if (assigned(Document)) then
 begin
      All := Document.All;
      Memo1.Lines.Clear;
      for i := 0 to All.length - 1 do begin
        HtmlElement := All.Item(i, 0) as IHtmlElement;
        if (Assigned(HtmlElement)) then
          Memo1.Lines.Add(IntToStr(i) + ' ' +
                          HtmlElement.TagName);
end;
      ShowMessage('Number of elements : ' +
                  IntToStr(All.Length));
    end;
end;
Figure 4: Accessing the document and printing all tags to a memo control.
 

The IHtmlDocument2 interface exposes several collections you can use to access the content of the browser. This example uses the All property to access all the tags in the document. You can find more information on the interfaces exposed by IHtmlDocument2 in the INetSDK documentation. Search on "IHtmlDocument2" to get the information. (You'll also notice that the All property of the IHtmlDocument2 interface is the same as the All collection of the Document object, if you are using scripting code.) Figure 5 shows all the tags in homepage.html after "walking" the DOM

0
 

Expert Comment

by:doncov
ID: 2813482
Sorry. I error.
0
 
LVL 3

Accepted Solution

by:
Mathias earned 150 total points
ID: 2813521
Try the following links:

Dave Baldwin: http://www.pbear.com/
There is a browser with many features:
- frames
- gif, jpg,...
- tables

The free version is available and can be used in your forms.

Arsène von Wyss: http://www.bsn.ch/avonwyss/programming/files/Delphi/QuickHTML.zip
A simple html browser (only text).
0
 
LVL 1

Expert Comment

by:darkloser
ID: 2829724
http://www.euromind.com/iedelphi

I think that is all that you search

best regards
0
 
LVL 15

Expert Comment

by:simonet
ID: 2829747
darkloser,

The user specifically no IE ("I don't want to use TWebBrowser component").

TWebBrowser is simply an encapsulation of Internet Explorer.

Alex
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

705 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