473,386 Members | 1,720 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,386 software developers and data experts.

Implementing a "Most Recent Files" list

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
idea how to implement such a list, but it sure would be easier if
there was some automatic way of doing it, similar to the Windows menu
item that shows the current list of mdi child windows.

Any suggestions?

Aug 9 '07 #1
4 3717
On Aug 9, 8:52 am, za...@construction-imaging.com wrote:
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
idea how to implement such a list, but it sure would be easier if
there was some automatic way of doing it, similar to the Windows menu
item that shows the current list of mdi child windows.

Any suggestions?
Well, you could always switch to C++ and use MFC - it's application
generator includes the Recent Files functionality. :-)

Besides that, I say you write a dll that has the functionality and
just add it to the various projects you need it for. The following
codeproject article might be a useful read:

http://www.codeproject.com/csharp/mru.asp

Thanks,

Seth Rowe

Aug 9 '07 #2
On Aug 9, 7:52 am, za...@construction-imaging.com wrote:
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
idea how to implement such a list, but it sure would be easier if
there was some automatic way of doing it, similar to the Windows menu
item that shows the current list of mdi child windows.

Any suggestions?
I would use and XML file and store recently accessed files there and
then populate the drop down with that information.

Aug 9 '07 #3
On Aug 9, 7:52 am, za...@construction-imaging.com wrote:
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
idea how to implement such a list, but it sure would be easier if
there was some automatic way of doing it, similar to the Windows menu
item that shows the current list of mdi child windows.

Any suggestions?
I would use and XML file and store recently accessed files there and
then populate the drop down with that information.

Aug 9 '07 #4
On Aug 9, 9:49 am, rowe_newsgroups <rowe_em...@yahoo.comwrote:
On Aug 9, 8:52 am, za...@construction-imaging.com wrote:
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
idea how to implement such a list, but it sure would be easier if
there was some automatic way of doing it, similar to the Windows menu
item that shows the current list of mdi child windows.
Any suggestions?

Well, you could always switch to C++ and use MFC - it's application
generator includes the Recent Files functionality. :-)

Besides that, I say you write a dll that has the functionality and
just add it to the various projects you need it for. The following
codeproject article might be a useful read:

http://www.codeproject.com/csharp/mru.asp
This code looks interesting. It brings up the notion that there are
two basic ways a most recent files list is implemented, either where
each of the most recent files occupay a separate menu item in the
Files menu, or, in this case, a sub-menu from a menu item labelled
Recent Files. I'm guessing the submenu method would be easier to code.

It also uses the registry to store the list of most recent files. I
would like to avoid using the registry. I would also like to avoid an
external XML file as another responder suggested. I am thinking of
using the My.Settings to store the list of most recent files. That
would keep it all inside the application. Of course, that would cause
the same list of recent files shown for any user who runs the app on
the same computer (like in a Citrix environment), where the registry
would be a better choice. But with the app I am currently working on,
it will be used by a user who has sole access to their own self-
contained workstation, so I am still leaning to the My.Settings.
Aug 9 '07 #5

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

Similar topics

7
by: beliavsky | last post by:
Ideally, one can use someone's C++ code by just looking at the header files (which should contain comments describing the functions in addition to function definitions), without access to the full...
5
by: Konrad L. M. Rudolph | last post by:
I hope this is the right NG, please notify me if not. I have got a problem with the "recent files" list of the start page in VS.NET: yesterday I created a new projekt which has the same name as...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
7
by: William Payne | last post by:
Hello, have you seen a recent files menu in a GUI application? In many GUI applications there's a menu the displays the most recent files that has been opened by the program. Say such a menu has...
2
by: George Marsaglia | last post by:
I have a set of, say, 2000 points in the 8-dimensional simplex S={(x_1,x_2,...,x_8),x_1+x_2+...+x_8=1, x's>=0}. To help analyze that 8-dimensional set, I wish to project the set of points onto...
3
by: Jim | last post by:
Is it possible to read the Temporary Internet Files folder using C#? I'm messing with FileIO (newbie here) and everything seems to work fine until I try to read the list of files in this Temporary...
8
by: | last post by:
The New York Times and many other online publications automatically generate "most popular article" lists that cover, say, the last 24 hours. I am looking for guidance and/or code on the best way...
2
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hi, In VS2003 I am able to clear the recent projects and recent files lists by editing the registry (although it seems that there should be a better way). However, when I look in the registry...
2
by: GB | last post by:
I the Start page of the VS 2005 IDE, I would like to be able to delete obsolete entries in "Recents projects" list, but I dont find any way todo it. Any suggestion?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.