By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 1,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

Most Recent Files Listing

P: n/a
In my application which allows a user to open specific AutoCAD script files
(SCR extension), I want to intoduce a listing of the 10 most recently opened
files.

I know of at least two ways that I could do this:
1) Have a text file that contains the information
2) Write the info to the Registry

The first is my easiest as I am familiar with TXT type files. I've never used
(and have no idea how to use) a XML type file (let alone the value or
advantage over a TXT file.

And I've never written anything to the Registry.

So on that note, any thoughts/comments/tips/hints on my best (or suggested
best) way to do this?

And because the file path will be LONG (sometimes over 100 characters) and the
actual files opened could be of the same name, I'll have some creative
thinking on how to list the files... so some tips from others who have similar
issues will be of great assist!

Regards,

Bruce
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Mr. B" <Us**@NoWhere.com> wrote
In my application which allows a user to open specific AutoCAD script files
(SCR extension), I want to intoduce a listing of the 10 most recently opened
files.

I know of at least two ways that I could do this:
1) Have a text file that contains the information
2) Write the info to the Registry

The first is my easiest as I am familiar with TXT type files. <...> And I've never written anything to the Registry.

So on that note, any thoughts/comments/tips/hints on my best (or suggested
best) way to do this?


It seems you should go with the method you know best. Not only would it be
a breeze to wire up, but the file would also be accessable to the user. In that way
the first entry could be the number to list, such that the user can easily set that value
there, (As well as some option page in your app). If they want 25 MRU names, then
they can have them....

Just a suggestion!
LFS

Jul 21 '05 #2

P: n/a
Mr. B.

When you search in the registry using Regedit to the latest opened project
in your recent file list you will see how Visual Studio does it. Why not do
it the same way.

The registry is easy to handle with VBNet.

http://msdn.microsoft.com/library/de...classtopic.asp

Why would you do it in another way than Microsoft or making it yourself
difficult with a file which has to be in a certain directory and needs than
extra's to manage that.

The way to do it can be is reading them in an array and every time when
there is a new opened push the oldest down and add the newest in top.

Than when you are closing you write them back as
File1
File2
File3

Etc.

Don't think about time involved with this kind of operations, for a computer
it is almost nothing.

I hope this gives some idea's

Cor
Jul 21 '05 #3

P: n/a
"Mr. B" <Us**@NoWhere.com> schrieb:
In my application which allows a user to open specific AutoCAD script
files
(SCR extension), I want to intoduce a listing of the 10 most recently
opened
files.


Add Most Recently Used Files (MRU) List to Windows Applications
<URL:http://www.codeproject.com/csharp/mru.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.