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

Internet History

Posted on 2003-11-01
Last Modified: 2010-04-05
Hey folks....
Iv been trawling through the net trying to find a solution to my question, but without any success.
I need to find a simple way of displaying my computors internet history in a memo box. I have seen this question answered on here before, however they all suggest downloading certain components from the net etc.... is there not just a way of doing it in normal code without components?
Note: i dont need it to be fancy, or modify the history in any way.... just a little bit of coding, which when say button1 is pressed, memo1 displays the computors internet history!
Anyhelp is greatly appreciated!

King Regards
Question by:Greenandroid
  • 4
  • 3

Expert Comment

ID: 9665211

Before posting a question, one should always try and find a way to
solve his/her own problems.

Specifically, looking for history in regedit, you come across this key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Where you find a value, labelled "history" that points to a folder.
In that folder, you'll find some sub folders you can access to
obtain the data you want.

To list the subfolders, use FindFirst/FindNext/FindClose functions.



Assisted Solution

ginsonic earned 30 total points
ID: 9665449

Author Comment

ID: 9665667
ok, il start with ginsonic....
ok... well first of all, i am aware of the Turlhistory component, and have already got that component installed on my computor.....however as i previously mentioned, ideally i need just a bit of code to add the history to a simple memo box.... The problem with the tUrlHitory component is that it seems to work perfectly in its examples, but seems to 'rip itself to pieces' when i try to get it to display the urls in a memo box.....
Il quite happily give you the points if you could give me a SMALL piece of code, using that component, that JUST adds the urls from the history folder to a memo upon the click of a button.... the demos included with tUrlHistory are much more advanced than i need (displaying dates etc) - a simple list of urls is all i need!

Now to deerbea.....
You say that 'one should not post until one has tried solving it themselves' - Well to be honest, i wouldnt be posting my question on here unless i had previously tried it, and got nowhere! Now to your comment..... I am aware that you can do it through the registry keys, however i must admit, i do not have any experience in this area at all. I have never had to use the registry in any of my applications before, which is why i would need further guidence. If, like you said, its possible through the key you mentioned, please could you write a small code which will do as i said? (Press a button and the list of urls from the history is displayed in a memo box!)
As with ginsin, i'd quite happily give you the points if you could do that!

Well thanks for the comments so far anyway, and im looking forwards to hearing back from you all!
Kind Regards
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Expert Comment

ID: 9665887

I had a test on it, to see if needed recursion and so on, but it
seems impossible to be done via "normal" code due to the
strange behaviour of the folder under DOS and Windows.

Thus, I devoted my attention to the History component, and I
though of a way to do it with that one:

Just issue a "DeleteHistory" handling the "OnDelete" event.
When you're in there, just add the URL to the memo and set
"Delete" to false to preserve it.



Author Comment

ID: 9666193
sorry, but please could you explain a little more in depth on what you mean....
Is this using the tUrlHistory component?

Also, please could you explain in a more step to step guide for me.... im not that used to the terms you use fro delphi, as i am newer to delphi than any other language i know... sorry to be a bit of a pain!

Kind Regards

Author Comment

ID: 9666268
Well thank god for that!!!

Iv just managed to get it to work perfectly for what i needed, and all i needed to use was the urlhistory component, and arrays!

Just to put you all out your misery, this is how simple it really was!
procedure TForm1.Button1Click(Sender: TObject);
  count, total: Integer;
  For count:=0 to Total-1 do

Looks so simple once you've worked it out!
I think il still try and give you both some points if i work out how, just for pointing me in the kinda right direction.... Thanks for all your help!

Accepted Solution

DeerBear earned 70 total points
ID: 9666284

Yes, I examined the possibility to walk through the entries via
plain code, but I noticed it was very difficult to do.

Thus, I explored the TUrlHistory component, to see if it was easier to

According to its documentation there's an event called "OnDelete"
that gets called each time you are going to delete an URL from history.

Its format is:

OnDelete(Title, Url: String; LastVisited, LastUpdated, Expires: TDateTime;
var Delete: Boolean);

Now, according to this prototype, you can see the Delete parameter
that can be changed. A value of True means "go on deleting" and a
value of False means "do not delete".

If you examine the documentation further, you'll see a method called


Which( according to documentation ) deletes all entries from the history

IF the documentation is complete, this means that calling DeleteEntries will
issue as many OnDelete events as the number of items in the history list.

If you examine well the OnDelete event, you'll notice a parameter called
URL that, according to the documentation, contains the URL about to be

This means that calling DeleteEntries will, among other things, iterate the
history list reporting each and every url in it.

This means you can do something like this

procedure MyForm.MyUrlDelete(Title, Url: String; LastVisited,LastUpdated,
Expires: TDateTime; var Delete: Boolean);
   URLMemo.Lines.Add( Url );
   Delete := False;

and call from your button:

procedure MyForm.MyButtonClick( Sender: TObject );

Now, if you place on your form a memo component naming it MyMemo,
name the form "MyForm" and the button you'll place "MyButton",
pasting the above code will display the URLs directly in the memo.



Author Comment

ID: 9666824
Thanks again guys...
let me explain what i have done for you quickly!

Well i managed to solve the problem myself (read above)....HOWEVER i wished to thank you guys for helping me, and so have given you the points anyway!

I have given ginsonic 20 points for suggesting a component (which i already had) but helped with DeerBears answers :P

I have given you the remaining 80 points DeerBear, as you have typed an awful lot, and hope its some reward to your aching fingers :P

Kind regards!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
Intraweb download file link ? 1 153
Strange behavior when a form is closed 6 60
tidtcpserver connection lost handle 2 100
Unique identifier on a terminal server (rdp) 4 67
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 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