473,594 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 21 '05 #1
3 1534

"Mr. B" <Us**@NoWhere.c om> 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
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
"Mr. B" <Us**@NoWhere.c om> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1634
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 DOES add new items to the list, but the date never changes for those items either... it retains the creation date of the project. (Don't know if this makes any difference, but I do have VS.net 2002 loaded as well).
3
2038
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 anyone know of a way to do this ? Any URLs, code snippets, etc ?
1
1808
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 2003. I could not find any updates for 2003 at microsoft.com. Is 7.1.3088 the most recent version (I have no idea if the box I bought at CompUSA had been on the shelf since 2003 :) Thanks, Eric Win XP Pro SP2, IE 6.0 SP2, VC++ .NET 2003...
3
2316
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 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...
4
2140
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 arbitrary number) and I need to get the latest file in the folder. Does anyone have a .NET solution to this problem. Any help would be greatly appreciated Thanks, Lee
4
2386
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
3730
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 clicking on the file name in the File menu. Thist list is usually just above the typical Exit menu item. I take it there is no "automatic" way of implementing this, that each application has to have code that manually does this. I have a good...
3
3083
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 stuck at the sorting of the files in a directory. This part of the code returns a list but it's not sorted by date: opendir(INPUTINFO, ".") or die "Doesn't work: $!"; my @xmlfiles = grep /\.xml$/, readdir INPUTINFO; my@sorted = map...
3
5175
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
7876
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8251
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8234
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3859
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2385
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1478
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.