Quick Search for:  in language:    
IE4,MDI,other,submissions,Features,Real,Offic
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,290,928. lines
 Jobs: 179. postings

 How to support the site

 
Sponsored by:

 
You are in:
 

Does your code think in ink?
Login





Latest Code Ticker for Visual Basic.
Check Placement of Form on Screen
By CubeSolver on 11/20


RT Full Duplex
By Brian Black on 11/20


C++ Template Hack
By OpcodeVoid on 11/20


Click here to see a screenshot of this code!DeskTop Generator
By Ziad Said on 11/20

(Screen Shot)

SQLMan
By Darwin H. de Leon on 11/20


Klik! CompareLib...Co mpare and synchronize schema differences in your Access databases...
By Özden Irmak on 11/20


listview000sher if
By Sherif Omran on 11/20


Using ComboBox instead of TextBox
By SMA Soft on 11/20


Click here to see a screenshot of this code!ColorFade
By SMA Soft on 11/19

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

CoolMenu v1.2

Print
Email
 
winzip icon
Submitted on: 6/10/2000 11:23:37 PM
By: Olivier Martin 
Level: Advanced
User Rating: By 46 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 25925 times.
 
 
     See my other submissions to get v1.3 <br> <br> Features:<br> -Real Office and Visual Studio like icon menus<br> -Disabled pictures in color (optional)<br> -Uses the form's font (optional, +size, +color)<br> -Working "local" and "global" shortcuts (&; Ctrl+?, etc.)<br> -Easy interfacing between ImageList and VB's Menu Editor<br> -Event on selection of menu items for context help<br> -2 ways to display check marks and/or radio buttons<br> -Full selection of item (bar) or text sel. (text color)<br> -IE4 hover effect on main menu bar items<br> -Tested in MDI environement<br> -Subclass more than one form<br> -Over 2000 lines (documented) to modify and play with<br> -Most complete icon menu project ever seen in VB<br> <br> Based on Paul DiLascia's work from the Microsoft System Journal Ported from VC++ to VB by me + some adaptation. visit www.dilascia.com

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
6/11/2000 12:27:14 AM:Omar
Thanks alot for sharing this code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/11/2000 1:16:15 AM:siph0n
Excellent code!  Easy to use.  One 
thing is when you dont use complex 
checks, and you select one of the 
checked menu's it will dim the check.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/11/2000 8:04:44 AM:twinny
Great job! thanx!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/12/2000 9:47:51 PM:Wow!
Does this support scrolling menus? 
ex.)IE Fav menu bar and Win98 start 
menu. Great code!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/12/2000 10:31:14 PM:Olivier Martin
I'm not sure I see what scrolling menus 
look like.
To siph0n: selecting a 
checked item IS suppose to "dim" the 
check mark background. Actually, 
Microsoft product use a special pattern 
for "normal" and the "dim" is the same. 
 Maybe some other time
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/12/2000 11:43:49 PM:VBDude
this is a really really great piece of 
work... i'm not bashing anyone's code 
but vbAccelerator's code is so complex 
to follow, this one is neat and clean 
and very well commented to show a 
newbie how it works... but i was 
wondering if at possible that this 
could be put into a activex control 
with the imagelist compatiblity 
built-in... so leaving the MS ImageList 
out of the picture completely...?Please 
keep up the great work!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/13/2000 9:18:14 AM:Olivier Martin
Thank you vbDude.  I think the way it 
is now is the simpliest interface 
possible.  Making it an activeX would 
just include the ImageList in it and 
instead of putting the control on the 
form, you would have to make a 
reference to the activeX anyway.  I 
don't see the interest but your free to 
do it for your self. I always prefer 
inluding re-usable source code then 
activeX in my projects when possible.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/23/2000 12:02:00 PM:RJ Soft of West Tennessee
Very very good code!  Now this is some 
code I can really use.  Thank you for 
uploading it.  Keep up the great work.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/26/2000 7:52:57 AM:Jachym
Thats me again: I've an idea, but I 
don't know how to do it: how to make a 
"personalized menu" like from Office 
2000 or Windows 2000 (sorry for my 
English :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/8/2000 7:50:57 PM:Dave Dorsey
Ridiculously easy to add to an existing 
application, and incredibly versatile.  
Two thumbs up for this tremendous code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/9/2000 8:04:51 PM:Tristan
i haven't checked, but did you fix the 
bug where when you click a menu, it 
drops down, then you move the mouse off 
of the top menu and the menu rect goes 
away when it should stay.. i don't feel 
like downloading and checking it
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/10/2000 12:55:45 AM:Olivier Martin
No it's not fixed. All Win98 users have 
this problem since the very first 
version but I'm working with W95 and 
noticed the bug after this release.  
Won't be able to work on the fix for a 
while, sorry
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/10/2000 3:49:10 AM:Mitch
Absolutely amazing! Very well done and 
an excellent job! This would be 
something that I'd expect to pay for.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/12/2000 12:29:26 AM:Seldon
This is incredible code!! Thanks for 
posting it and providing the helpful 
comments - this is truly a fantastic 
piece of programming.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/12/2000 7:22:44 AM:Babu
Thanx for this well job u do!
There 
are lots of codes can help me 
learning this greatfull language.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/13/2000 2:29:36 PM:Sean
Hi VBDude,
The code at vbAccelerator 
is complex because it is a site for 
advanced visual basic source code.  I 
think that the menu stuff written by 
Steve is excellent (I am not saying 
that this is not good) and the source 
code can be downloaded from the site 
(maybe in a different project though).
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/13/2000 4:12:33 PM:Tom Garratt
This code is AMAZING! One minor bug 
though: When you change the menu 
caption, the caption comes out as a 
load of garbage, and the menu icon 
dissapears.
I have a main menu 
called 'mnuFile', and a submenu called 
'mnuSave', the caption of mnuSave is 
'&Save...' and has an icon (standard 
Save icon).
When I click 'mnuFile' I 
have some code to determine if the 
thing can be saved or not. If it can, 
then it enables mnuSave (which works 
fine), it also changes the caption to 
'&Save [Another string]'. The Another 
String is just a filename.
When the 
caption is changed, the caption is 
garbage (something like wingdings), and 
the icon disappears. When you move the 
move the curser over the menu 
(mnuSave), then it will chage the 
caption successfully, but not include 
an icon.
Please help, I am sure is 
it only small :)
Thanks for some 
really great code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/13/2000 7:57:22 PM:Hilton
Hi,
When I was using an example in 
MDI forms, a bug occurs in maximization 
of child form, like this:
1) some 
captions of menu disappeared; 2) icons 
standard (Windows) were replace by 
another from the program.
Can you 
elucidate this?
Thanks.
 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/13/2000 8:01:53 PM:Tristan
steve from vbaccelerator is so good at 
API i think he sold his soul
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/15/2000 8:12:42 AM:Joakim
Great code! Thanks for sharing it :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/19/2000 5:19:58 AM:sivasudheer
why don`t you convert realy cool menu 
examples from codeguru.com they are far 
greater than yours they even allow you 
to customize the toolbars and menubars 
just like office 97 and vs6.0
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/19/2000 5:22:18 AM:sivasudheer
can you implement the office 2000 
menubar just like word (though it is 
akward)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/25/2000 10:02:53 PM:Andrew Juergens
This is great code.  Have you ever 
considered putting it into an ActiveX 
control?  
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/26/2000 9:22:54 AM:Olivier Martin
Don't you think that having to 
distribute the vb runtime files on an 
host computer is enough garbage ?
An 
ActiveX would solve a lot of property 
'problem' but I won't do it
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/3/2000 11:10:55 PM:Dragonrider15
i'm having a bit of trouble using your 
code.  i insert the code exactly as you 
have it, except for one change:  the 
name of my imagelist.  when i run the 
program, i get plenty of errors in the 
debug window, and the menus aren't even 
there.  if you have some info about 
this, please email it to me.  if you'd 
like, i could zip up an example and 
send it to you.
thanx,
dragonrider15
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/4/2000 8:19:25 AM:Olivier Martin
I'd really like to see the example 
you're proposing.  I don't see how you 
can get those kind of errors.  I'm 
mostly interested in the pictures 
you're using...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/8/2000 10:44:09 PM:Brian Lockwood
Excellent code - easy to implement - 
one prob.  7 of these " 91 Object 
variable or With block variable not set 
WindowProc" every time I close the app. 
 I have it working fine on another form 
but can't shake these error messages on 
one form.  Depending on how you close 
your run time - it may take VB down 
with it when it closes.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/9/2000 3:14:07 AM:Rob
RE: MDI App
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/9/2000 9:26:49 AM:Olivier Martin
Brian, if you can't shake them off, 
send me your code and I'll try finding 
the problem. I'm sure you realize that 
I can't help you with the info provided.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/11/2000 4:30:03 AM:Steve Ironside
Fantastic code!! This is what code 
reuse should be about - simple enough 
to drop in anywhere with virtually no 
extra work (I'm retrofitting some older 
applications now!) Great Stuff - thanks 
for sharing!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/11/2000 4:33:50 AM:Steve Ironside
Fantastic code!! This is what code 
reuse should be about - simple enough 
to drop in anywhere with virtually no 
extra work (I'm retrofitting some older 
applications now!). It also works 
brilliantly with Popup and dynamically 
created menus as well, by the way. 
Great Stuff - thanks for sharing!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/11/2000 4:47:06 PM:Eddie Ferrier
I can't run it! For some reason all the 
class modules begin with:  MultiUse = 
-1  'True  Persistable = 0  
'NotPersistable  DataBindingBehavior = 
0  'vbNone  DataSourceBehavior = 0   
'vbNone  MTSTransactionMode = 0   
'NotAnMTSObjectEndAll before the Option 
Explicit Statement. when i try to run 
it it correctly states that MultiUse is 
an invalid outside procedure. I run VB5 
SP3
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/12/2000 8:31:17 AM:Olivier Martin
Eddie, the property you're talking 
about are the module's property.  They 
should not be added to the code.  If 
you remove all the extra at the 
beginning of each module, you'll be 
able to run compile them.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/18/2000 12:28:51 AM:Dragonrider15
i have a suggestion for your menu code. 
 try putting a picture that runs the 
full length of the menu down the 
left-hand side like you see in the 
windows start menu.  if you can get 
this done, i'd like to know.  :o)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/18/2000 4:30:12 PM:ummmm
i cant figure out how to use the image 
list control =( ... how do i get icons 
from my hard drive into the menu.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/20/2000 3:51:16 PM:Derek Tremblay
tank you for you code. but  2 major bug 
occur ..
1:  the complex check box 
in win2000 is white
2: the function 
END is not functionnal because a crash 
occur in VB ... please fix it
tank 
you
ps: sorry for my english i'am 
french
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/29/2000 6:58:07 PM:Gerbil Fan
I have a fix for the VB End Command - 
If you have an MDI form, put this code 
in the unload event:
For T = 1 To 
Forms.Count - 1
    Unload 
Form(T)
Next T
That code unloads 
the child forms, and then the MDI form 
unloads. When all of the forms are 
unloaded, the program exits normally, 
and VB does not crash. (Unless you 
don't uninstall the subclass; then it 
might crash.)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/1/2000 4:36:44 PM:chris
I like your code very much. I applaud 
you. I have found a bug. The calling 
sequence is this. The form calls 
"popupmenu" and then these methods get 
called in your 
code:
popupmenu-->WindowProc-->OnInitMe
nuPopup-->ConvertMenu-->BSTRtoLPSTR-->Co
pyMemory B(1), ByVal lpsz, cBytes + 
2
The line of code above calling 
"CopyMem" GPFs. In sum when you call 
your code using popupmenu, a GPF 
happens, but not everytime. CopyMem 
blows up, so it's a pretty serious 
crash. I would be happy to send you a 
small sample app's source so that you 
can reproduce the behavior. I've tested 
on NT4(sp6) and win98. I'm sorry to 
report a bug in what is really terrific 
API programming, but I honestly don't 
know how to fix it, even though I've 
tried for a few weeks. There are real 
world scenarios where this will be a 
problem. TIA
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/1/2000 7:22:51 PM:Olivier Martin
That's a big problem but could be easy 
to fix.  I don't remember in what kind 
of conditions it happens, but the 
memory area where the data is copied 
from is not always text.  That's why 
you're CoolMenu crashes.  Could you 
send a screenshot of the menu 
(subclassed if you can, or in the IDE) 
to my e-mail.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/6/2000 7:18:33 PM:Matt
Will you have a new version out soon 
that will fix the check bug where the 
colors are different on each version on 
Win xx?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/4/2000 6:43:45 PM:Mark
Great code! One problem for me: I don't 
get the callback on a popupmenu when 
the menu is set to invisible. When 
visit, the callback works fine. If you 
know a workaround, please let me know!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/9/2000 7:13:20 PM:Brent
THIS IS GREAT!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/23/2000 11:46:15 AM:Tim
Impressive code - turns 'blah' to 'YAY' 
in seconds. :) I always find myself 
back at PSC to grab this code whenever 
I'm making an app to be distributed. 
WTG!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/4/2001 2:12:44 PM:Bill
Does this REALLY work in  VB 5? It 
tells me that retained is an invalid 
key.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/22/2001 3:33:58 PM:Greg C.
If this code is in a OCX control It 
would not crash if you push the 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/27/2001 12:45:06 PM:Mohammad
Very Unprofessional but it is very 
creative, i'll vote Good fer it
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/15/2002 6:02:03 PM:Tim Sørensen
I use this in a MDI form.
When I 
maximize a MDI Child, and the little 
extra icon appears in the upper left 
corner and i move the mouse through the 
menus, an error 457
appears. "This key 
has allready been assigned..."
The 
error is in "CMyItemDatas" Function 
Add() mCol.Add objNewMember, 
sKey.
How do I work around?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/21/2002 10:26:06 AM:OpenBrowser Developer
Great! Thanks for share your code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/14/2002 7:23:59 AM:Jeffrey Bostoen
It's a very great code! 5 globes!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/7/2002 11:23:08 AM:Robert Kersey
I think you code is great but, Jeffrey 
Bostoen seems to think LaVolpe Submenus 
was stolen or taken from you. I did 
give you five globes as well as 
LaVolpe. Anyways good code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/26/2002 4:52:45 AM:
I would love to thank you so much. You 
share a code that I have found for 
along time.
Well Dond ! Keep working 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/10/2003 10:04:08 AM:
I've used your MDI App that works fine, 
but when occurs any error in the 
MDIChild the program ends without any 
error message.
It's only occur when 
the App is running Exe Mode.
What's 
happen ???
thanks..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/10/2003 10:04:45 AM:
've used your MDI App that works fine, 
but when occurs any error in the 
MDIChild the program ends without any 
error message.
It's only occur when 
the App is running Exe Mode.
What's 
happen ???
thanks..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.