Important alert: (current site time 5/18/2013 10:51:03 PM EDT)
 

winzip icon

HookMenu 1.5

Email
Submitted on: 11/18/2003 7:59:44 AM
By: NR/GN 
Level: Advanced
User Rating: By 52 Users
Compatibility: VB 6.0
Views: 28251
 
     This control is an update to the excellent HookMenu control written by Vlad Vissoultchev. New features/fixes include o fully customisable colour scheme (allowing Office 2003 style menus) o new properties dialog o menu column support o Accelerator Key support for NT os (thanks Vlad) o various menu drawing issues o + Many More Thanks to Vlad, originally for the control, for help with the Accelerator key support and his agreement to repost this updated version of the Hookmenu control. Also thanks to: Carles P.V. for his coolist - that was ammended to suit this control. Any bugs please report. Updated: 20/11/2003 Thanks To Neal Who Fixed The Bug Relating To The Seperator Lines Being Selected When They Shouldn't.

 
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 tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

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
11/18/2003 9:09:57 AMGarf

What a fantastic update. *****
(If this comment was disrespectful, please report it.)

 
11/18/2003 1:26:55 PMLight Templer

Hi NR/GN , cooooool stuff! Looks great! Thx for sharing, °°°°° and regards LiTe
(If this comment was disrespectful, please report it.)

 
11/19/2003 4:12:29 AMAndrea-Batina

Outstanding!!! OOOOO
(If this comment was disrespectful, please report it.)

 
11/19/2003 7:25:19 AMSknoerf

Great Job. have HookMenu 1.4 in many Applications - works great. Tnx for sharing and best wishes to Vlad. He's a cooool Programmer :)) Cheers
(If this comment was disrespectful, please report it.)

 
11/19/2003 8:14:08 AMMatthias Zirngibl

That's what i am waiting for! *****
(If this comment was disrespectful, please report it.)

 
11/19/2003 9:43:03 AM

Brilliant! This is by far one of the best Office Menus!
(If this comment was disrespectful, please report it.)

 
11/19/2003 10:25:20 AMKarahaNa

hmm, not working..
keeps saying "... not defined" evendoh all refrences are made.
(If this comment was disrespectful, please report it.)

 
11/19/2003 12:14:53 PMHibiki Tokai

KarahaNa is right...this program is not working. I'm using Windows ME right now. Can u please tell me how this thing works.
(If this comment was disrespectful, please report it.)

 
11/19/2003 6:06:14 PM

What can I say? Five Globes.
Great job...
OOOOO
(If this comment was disrespectful, please report it.)

 
11/19/2003 11:51:42 PMSkymaster

excellent ! this is very good for me !
(If this comment was disrespectful, please report it.)

 
11/20/2003 1:44:17 AM

This is cooool !

I wish if there is a version for VB .Net .
(If this comment was disrespectful, please report it.)

 
11/20/2003 5:18:31 AM

Excellent code!
Only one problem:

I press Up/Down arrow key when the menu is showing, it will stop on a separator.
(If this comment was disrespectful, please report it.)

 
11/20/2003 6:22:23 AM

Great update!
My dream come true!. 5000 stars of cause.
(If this comment was disrespectful, please report it.)

 
11/20/2003 8:59:43 AMNR/GN

Updated:
The Bug Regarding The Seperators Has Now Been Fixed.

20/11/2003

Regards

(If this comment was disrespectful, please report it.)

 
11/20/2003 9:43:02 AMPaul Caton

Excellent update of the mighty Vlad's hook menu... with most of the stuff I was hoping for, great! 5 globes and a shoe in for a prize. For the future, perhaps you'd consider an alpha-blended shadow.
(If this comment was disrespectful, please report it.)

 
11/20/2003 2:36:58 PMJonathan D

None of the code worked, I run win98. What systems are this project configured for? How does one register the .tlb?
(If this comment was disrespectful, please report it.)

 
11/20/2003 8:57:29 PMUnruled Boy

bugs occured when menu items exceed the maximum space of the screen, the scroll icon appears, and, the bug occured...
(If this comment was disrespectful, please report it.)

 
11/21/2003 12:04:34 AMMatthias Zirngibl

A little Bug: If the top menu items are changed (renamed) then the color of them disappears.
(If this comment was disrespectful, please report it.)

 
11/26/2003 7:14:19 AMPeter Kemp

Thanks for this excellent update.
5 Balls.
You deserve it.

(If this comment was disrespectful, please report it.)

 
11/30/2003 4:52:30 AMCodeClub

where's the new coollist???
(If this comment was disrespectful, please report it.)

 
11/30/2003 5:01:40 AMCodeClub

why not remove the common dialog control to make it fully indepent?
(If this comment was disrespectful, please report it.)

 
11/30/2003 3:09:58 PMSami A. Haija

Hey,
Can you write this in pure VB ?
Thanx
(If this comment was disrespectful, please report it.)

 
11/30/2003 8:07:56 PMCodeClub

Of course, but I think that asm can accelerate some math manipulation quicker.
(If this comment was disrespectful, please report it.)

 
12/21/2003 11:03:22 PM

Excelent, Good job.
But, there's a litle problem with icon colors, i used the office 2003 style and i test it with some of my icons,, and it change the color to green. i guess its something related with the mask color, i added icons, no bitmaps.
Maybe i have done something bad.
(If this comment was disrespectful, please report it.)

 
8/19/2004 8:31:29 AMSanta''s Little Helper

I think this is a great control. 5*'s from me. I would just recommend a change for your next version (if any).
If I change the menu to office 2003, it would be nice the colour was to go across the complete menu bar rather than finishing up and the menu item, I am saying this because it looks a little weird with blue up to menu item style and then its grey after that.

Please email me back if your not quite as to what I am trying say..
Regards

Santa
(If this comment was disrespectful, please report it.)

 
8/31/2004 7:36:11 PM

Good stuf vlad... tkx for share...
I'm impressed !!!
(If this comment was disrespectful, please report it.)

 
1/4/2005 11:39:30 AM

Pure Exellence, Maybe next you can make an office style tab system?
(If this comment was disrespectful, please report it.)

 
2/15/2005 8:26:36 AMMirko Kressmann

At first let me says: This is excellent.
One problem: How can i set an icon for a popupmenu created by CreatePopUpMenu-API???

Greetings
Mirko .... 5 Globes...
(If this comment was disrespectful, please report it.)

 
3/8/2005 7:09:52 AM

It's very good,but it can't work when I use Windows 98 SE!What can I do?
(If this comment was disrespectful, please report it.)

 
3/25/2005 5:05:52 AMfrostbyte2k2

How can i personnalize My menu's background color ? thanks a lot
(If this comment was disrespectful, please report it.)

 
4/3/2005 1:25:11 AMDr. Fire

Notice the shadows ladies and gentlement who post about it not working? That is a very strong hint that it only works on 2000/XP!
(If this comment was disrespectful, please report it.)

 
7/6/2005 7:12:33 AM

MDI RightMenu???????
(If this comment was disrespectful, please report it.)

 
7/26/2005 12:24:23 AMpad

hi, this is really an excellent code. thanks so much for sharing. but i have a little problem though, the display gets messed up when the caption of the menu item is changed at run time. in my application, the caption for the menus changes when certain events happen like when a listitem is selected, the menu caption changes to the name of that listitem selected. i can give you a screenshot if you want. - guyjasper
(If this comment was disrespectful, please report it.)

 
7/31/2005 5:22:09 AMjlcvbcoder

hi! i appreciate your program so much... but i just want to ask... how could i change the background of the menu? i am also experiencing a general error whenever i terminate the program using the code... i hope you could help me...
(If this comment was disrespectful, please report it.)

 
7/31/2005 5:41:33 AMPankaj

A Brilliant and easy piece to implement. Must be the best in its category.
(If this comment was disrespectful, please report it.)

 
8/8/2005 12:13:24 AMShifan

Excellent stuff, no word to express
(If this comment was disrespectful, please report it.)

 
8/8/2005 11:12:39 PMYhet

Is this version working on MDI forms?
Thanks for sharing this very nice code

(If this comment was disrespectful, please report it.)

 
11/21/2005 7:40:55 AMfrostbyte2k2

how can i change the back colour of my menu
(If this comment was disrespectful, please report it.)

 
2/1/2006 9:48:58 AMErik

Good code!
(If this comment was disrespectful, please report it.)

 
3/23/2006 12:49:52 AMPhilip Zac

Hi, NR/GR, I have been using this hookmenu in my programes. Very nice. But yesterday i saw some one released this code in a web site and selling it in the name of visumenuEX at sales@partaksoft.com, r u start selling this ocx or some one else doing it... please look in to it....

Thanks
PHILIP
(If this comment was disrespectful, please report it.)

 
3/25/2006 11:56:14 AMEmmanuel Addo Amoafo and George Osei

Excelent Code. But can you do something about the flikering. It usually happens when there are a lot of costom controls on the form
(If this comment was disrespectful, please report it.)

 
6/30/2006 10:29:43 AMMadhu Sudhanan

Can anybody juz tell me how to use this in MDI form??Itz working fine in child forms... but with MDI i could'nt make it work.. plz help me
(If this comment was disrespectful, please report it.)

 
11/5/2006 8:48:34 AMMoroco

Hi,
This code is very great, i downloaded Vlad's code .
There is a point to correct : If you attach an icon to a menuitem fron an file who contains diffrent sizes, it does'nt select the correct size according to bitmap size selected before .
BUT it's a GREAT code anyway . 5 globes to you and to Vlad.
(If this comment was disrespectful, please report it.)

 
1/23/2009 8:03:50 AMRove

Great Code!!!!!
The menu background doesnot fill fully.
Only till the last menu it fills the back ground. Please Help me!!!
(If this comment was disrespectful, please report it.)

 
5/29/2009 2:13:40 PMalberto

GREAT CODE!. I was wondering if there is any documentation. I am having trouble with the subclass due to the fact that i am also changing background colors on toolbar, treeview and ststus bar.
(If this comment was disrespectful, please report it.)

 
12/12/2010 12:28:09 PMDennis Johnson

Excellent code! I'm using it in almost all my programs.

I detected a tiny issue: In Windows Vista or later and XP x64, the bottom left part of the menu's border doesn't have a shadow. It doesn't happen when you move the mouse to another top-level menu. It also doesn't happen when the window is maximized.

I have a suggestion, too: Can you help me find a way to add support for changing the top-level menu text color? You can even update the code here!
(If this comment was disrespectful, please report it.)

 
1/28/2011 2:18:01 AMRojalde Arintok

cant support MDI Forms,
an AlphaBlend or Gradient like in menu Office 2007 the yellow one when you hover the cursor on a menu, it would be great if this feature is implemented and should the whole top menu is change when you change the color, let say yellow the yellow color stop on the last menu, it should be on the whole top menu.
(If this comment was disrespectful, please report it.)

 
11/25/2011 6:51:04 PMDennis Johnson

I finally found out what caused the missing shadow!

Here are the instructions to fix it:
Go to pvGetBackground function and locate the line: If OsVersion = VER_PLATFORM_WIN2000 Or OsVersion = VER_PLATFORM_WINXP Then
Change it to: If OsVersion >= VER_PLATFORM_WIN2000 Then
and that's it!

Apparently, the "correct" code was being executed only under Win2000 and XP, despite the fact that it should be executed under all Windows versions after 2000.
(If this comment was disrespectful, please report it.)

 
12/24/2011 10:03:19 AMGarry

just wanted to know if you can set the menu text a different colour. I would like to use a dark menu and background and would like to have white text. many thanks
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.