Results 1 to 5 of 5

Thread: Recently Used Documents

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    1

    Post

    I'm making a project using VB6 and I want to add a recently used files list on the the file menu, like the ones in Word, Excel etc.

    Can anyone help??

    Thanks

    Celtis

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You should use menu editor (ctrl+e) to edit your menus, just leave 4 (or more) lots empty for the recent files, and make sure you use indexed menus, so that you can catch the menuclicks in the same event.
    To remove the slots, just put their property to invisible.
    Use the registry to store the filenames, (look up savestring and getstring for simple use) and move down the filenames to the next slot in a for next loop, when you add the next filename. To check if the recent filename has been used, just compare them in a for next loop.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Lively Member Kersey's Avatar
    Join Date
    Jun 1999
    Location
    The Netherlands
    Posts
    101

    read msdn : Creating and Modifying Menus at Run Time

    it says :
    You must use a control array to create a control at run time. Because the mnuRecentFile menu control is assigned a value for the Index property at design time, it automatically becomes an element of a control array — even though no other elements have yet been created.

    When you create mnuRecentFile(0), you actually create a separator bar that is invisible at run time. The first time a user saves a file at run time, the separator bar becomes visible, and the first file name is added to the menu. Each time you save a file at run time, additional menu controls are loaded into the array, making the menu grow.

    Controls created at run time can be hidden by using the Hide method or by setting the control's Visible property to False. If you want to remove a control in a control array from memory, use the Unload statement.


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

    Help Link

    Hi,
    Though I have done it years back, I am unable to recollect the exact steps. Still, this link can be helpful to you.

    Best Regards,
    Thanks and Regards,
    Venkat.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

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