473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Most Recent Files Listing

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
Nov 21 '05 #1
3 2267

"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

Nov 21 '05 #2
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
Nov 21 '05 #3
"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/>
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Harold Crump | last post by:
Greetings, I need to get a list of all files in a particular virtual directory on a web site, such as - http://www.myServer.com/FileStore I tried using the directory functions, but this...
1
by: Eric Robishaw | last post by:
In VS.net 2003, my recent files list will not update the Date. If I open a project from the list, modify it and close... the next time I load VS.net, the project shows the same old date. It...
3
by: Mr. B | last post by:
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...
3
by: David Jacques | last post by:
I am trying to get a list of all files of a certain extension type on disk to do some processing in a loop. The code needs to be portable to UNIX, so I need to use plain c functionality. Does...
1
by: Eric Del Sesto | last post by:
I tried the VC++2005 Express beta today and found so many errors in the documentation and sample files that I realized I needed to go back to the most recent released IDE, and purchased VC++ .NET...
4
by: Lee | last post by:
I have an application where I need to find the most recent file placed in a folder. For example, my users periodically place an image file with the format "ImageXXXX.jpg" (where XXXX is some...
4
by: jamesd | last post by:
Say I have 3 .bak files named: jamesB.bak, jamesG.bak, jamesW.bak Is there a clever way to find out which is the most recent of these backup files?? Using sql query analyzer preferably...
4
by: zacks | last post by:
Most applications whose purpose is to work with various types of files implement a "Most Recent Files" list, where the last, say, four files accessed by the application can quickly be re-opened by...
3
by: tevo | last post by:
Hello, I'm trying to do a Perl script on Windows (wish it was Unix) that goes to a directory, figures out which files are most recent, within the last week, then copies them to another dir. I'm...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.