[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FPiette HTML / HTTP component

Posted on 2000-04-30
14
Medium Priority
?
512 Views
Last Modified: 2010-05-18
Hi,

This is my problem: I need to create a simple Internet browser.  I started off using THTMLViewer, but it dowsn't show animated gifs properly, so I had to replace it.  I had planned to mix FPiette HTTP component with www.pbear.com HTML viewer to create my browser, but since I am a novice Delphi programmer, I haven't been able to simply pull off the code I need from the examples included.

My question is: could someone give me the code (the simpler the better) from FPiette's HTMLGet example to specify a url address and save the source code to a temp file on my hard disk?

That's all I need (for now)

Thanx in advance

Fabián
0
Comment
Question by:fabianm
[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
  • 4
  • 3
  • 3
  • +3
14 Comments
 
LVL 1

Expert Comment

by:rowisoft
ID: 2765369
Hello!!

That's very simple!
I thikn you have Delphi Standrad, or?? Because in the professional or enterprise-edition, is a WebBrowser included!

Do this:
Make "Components","import ActiveX" and in the list look for "Microsoft Internet Controls (Version 1.1)" and install it!
In your VCL on ActiveX you vind nor "WebBrowser" and "Webbrowser_V1", use the WebBrowser-Component!
Use the method
WebBrowser1.Navigate('http://www.rowisoft.de');
to browse html-files!!

Its very easy to use!

Robert
0
 
LVL 1

Expert Comment

by:rowisoft
ID: 2765370
Hello again!

If you don't like the ActiveX component, go to "http://www.pbear.com", there is a html-component, too!

Bye

Robert
0
 
LVL 4

Expert Comment

by:mhervais
ID: 2766010
just a complement to rowisoft remark :
if you are planning to use the active-x viewer of microsoft, you should reinstall ie4 first otherways your app will not be compatible when installed on users of ie4.

the pebear component is good too.
they have 2 versions : one freeware (no frames), the other one shareware with frames but as far as I remember, you cannot expect to work with java applets, xml or things like that
0
Independent Software Vendors: 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!

 
LVL 1

Expert Comment

by:rowisoft
ID: 2766030
One 1 remark, too: I'm not sure about the UniSys-Rights on the PBear-component because gif....

Ask PBear is the best - he know if he payed lots of money to UniSys... ;-)!
0
 
LVL 4

Expert Comment

by:mhervais
ID: 2766492
I don't know what's about this licence problem : I never heard that they sued anybody using gif's without paying licence.

However, better not use GIF's in the products
0
 
LVL 5

Expert Comment

by:Gwena
ID: 2766963
listening :-)
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2767785
listenning abot Gifs
(hi gwena)
0
 
LVL 1

Author Comment

by:fabianm
ID: 2768002
Rowisoft,

Unfortunately I can not rely on the destination computers having installed IE4 before, so I can't use that component.  And to all the other people telling me about the pbear component, I'm already using it, but it can only display HTML files stored locally, so I need to "merge" it with an HTTP component (such as FPiette's one) to re-create the browser and display files on remote computers.

Thanx so far...
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2772865
just use fpiette's example..

something like:

procedure TForm1.Button1Click(url: string);
var Dat: TMemoryStream;
    p, q, r : PChar;
begin
    Dat := TMemoryStream.Create;
    try
        httpcli1.URL        := url;
        httpcli1.RcvdStream := Dat;
        httpcli1.Get;
    finally
        Button1.Enabled := TRUE;
    end;

.....

just replace TMemoryStream by TFileStream and use a temporal
file, load it with that html viewer, then FREE the stream (VERY IMPORTANT)
and that's all

0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2775349
Listening
0
 
LVL 1

Author Comment

by:fabianm
ID: 2776247
rwilson,

Looks OK to me, however I'm receiving this weird error, something about not being able to fing THttpCli.  It is in the HttpProt unit, after ignoring this error the project compiles OK, but as soon as I get into the first line using httpcli, I get an error:

read of address FFFFFFFF

or something like that.  I'm using Delphi 4 C/S, but since I'm a newbie, I don't know how to isolate that error.  I asked this question because some of FPiette's examples (specially the httpget one) didn't run at all on my computer...

If you need nmore info, please let me know.

Sorry if I take that long to answer, I can only get here at late night......
0
 
LVL 3

Accepted Solution

by:
bryan7 earned 200 total points
ID: 2776689
hmm, I don't get any error running fpiette's examples.. that's weird..
you can use something like

  try
                       httpcli1.URL        := url;
                       httpcli1.RcvdStream := Dat;
                       httpcli1.Get;
  except
                       showmessage('some error happened!');
  finally
                       Button1.Enabled := TRUE;
  end;

try reinstalling delphi 4 and ics components..
0
 
LVL 1

Author Comment

by:fabianm
ID: 2779604
bryan7,

I also suspected that I might have a problem with my Delphi installation.  So I'll have to check FPiette's examples in another computer.  Meanwhile, I'll accept your last comment as an answer, because of your directions and for providing some simple code.  However, I'll have to grade the answer as not that good.....

Thanx for everything!!


F.
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2780233
thanks for the points =) come back here if you need more help
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

649 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