472,958 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 3687
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?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.