Results 1 to 6 of 6

Thread: Load History

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    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

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    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.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    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.


  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    I know why, I was spelling Visible wrong!! Duh!

  5. #5
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    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

    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net


  6. #6
    Junior Member
    Join Date
    Jan 2000
    Location
    Edmonton,AB, Canada
    Posts
    30

    Post

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width