PDA

Click to See Complete Forum and Search --> : Load History


Rick H
Jan 24th, 2000, 05:10 PM
Is there a built in way of having a "load history" on my file menu. E.g I want to have short cuts to the last 4 opened files on the bottom of my File menu.

Like this

File
-----

Load
Save
Save As
Exit
-------
afile.txt
another.txt
some.txt
pooh.txt


Or would I have to manually store the last file opened in a config file and insert the items onto the menu myself?

Cheers

DiGiTaIErRoR
Jan 24th, 2000, 05:18 PM
Probably the easiest way is doing this:
make 4 invisble menus in the file. Then setup an array for the filenames and enter the array into the menu.
Good Luck,

------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.

Rick H
Jan 24th, 2000, 06:16 PM
Sounds good, but how do I make the menu items visable again? (after setting them invisable in the menu editor)

I have tried this, but it does`nt work

MDIForm1.mnuFileHistory(pos).visable = True
(were pos is my index)

because it does`nt recognise "visable" as an extension.

Rick H
Jan 24th, 2000, 06:23 PM
I know why, I was spelling Visible wrong!! Duh!

venkatraman_r
Jan 24th, 2000, 06:59 PM
Hi,

You can collect the files using array and store in a file. Then once u again load the form, u look for the text file and read line by line and use the Line Inout function to load the file list in the menu.



------------------
Regards,

Venkat

venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net

Candu
Jan 24th, 2000, 09:07 PM
You can also use the system registry to store Savesetting (VB6) the file names and then use GetSetting (VB6) to once again retrieve them. This is how most if not all of the Microsoft applications work to implement this.

------------------
David L. Baudais
Systems Analyst