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


Internet History

Posted on 2003-11-01
Medium Priority
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
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

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 90 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


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 210 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

721 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