|
-
Sep 7th, 2000, 05:49 AM
#1
Thread Starter
New Member
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
-
Sep 7th, 2000, 05:56 AM
#2
transcendental analytic
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.
-
Sep 7th, 2000, 10:43 AM
#3
Lively Member
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.
-
Aug 21st, 2002, 02:35 AM
#4
Hyperactive Member
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.
-
Aug 21st, 2002, 06:37 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|