Important alert: (current site time 7/15/2013 9:11:43 AM EDT)
 

winzip icon

KMMenuCompnent

Email
Submitted on: 2/22/2005 4:57:39 AM
By: Kunal Mukherjee 
Level: Intermediate
User Rating: By 24 Users
Compatibility: VB.NET
Views: 16278
author picture
(About the author)
 
     This is the new version of the UltimateMenus project for menus I submitted earlier. Now its more easy and fun to work with the new version. Just simply click and drop the KmMenuComponent Provider control from the toolbar. and set the properties through the properties window. Lots of themes included. go ahead try it out and let me know what you think of it. Please don't bother your self with the second control I mean the KmProfessional component. It still needs some work. But the first component will work fine. Give it a try. ENJOY...

 
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.

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 4 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 Intermediate 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
2/22/2005 7:19:21 AMDeepak Kumar Shaw

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

 
2/23/2005 4:41:30 PM

Very good peace of code.


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

 
2/23/2005 10:52:19 PM

new to vb.net, but the code seems to be well commented. thanx for sharing it.

keep on going man. It's cool enough to impress every one.

But lots of code, some times i am getting confused.

Well 5 from me.
(If this comment was disrespectful, please report it.)

 
2/24/2005 12:46:40 AM

Great code! Just might take a while to go through all of the different settings, but that's a good thing.
(If this comment was disrespectful, please report it.)

 
2/24/2005 7:26:08 AM

well i am new to vb and this one was very easy for me to understand thanks man you definitely get a 5 from me
(If this comment was disrespectful, please report it.)

 
2/24/2005 7:26:56 AM

the coolest amnong the menu provider projects I have ever seen.

it deserves more than 5. But 5 is the limit, so 5 from me.
(If this comment was disrespectful, please report it.)

 
2/24/2005 9:44:51 AM

Great job... well done boy...
just keep it up... i am always with you... you deserve 5.
(If this comment was disrespectful, please report it.)

 
2/24/2005 7:30:05 PMCodeFester

You have a real winner here. I have been frustrated by the fact that .NUT IDE (for the $$) didn't have this ability. No one has ever made older VB's do this easily. This is easy and spot on. Thank you so much for sharing it! 5 floating ballz from me....
(If this comment was disrespectful, please report it.)

 
2/25/2005 9:18:39 AM

Great job... well done boy...
just
keep it up... i am always with you...
you deserve 5.

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

 
2/25/2005 3:50:02 PMAníbal Svarcas

Exellent work.
Performance feedback:
I,ve fond that when using the click event of a menuitem to do some long task, the menu doesn't hide inmediatlly.
Since the menuitems don't have a Refresh or Invalidate method i've solved it adding a code like this:

ParentMenu.Visible = False
Me.Refresh
ParentMenu.Visible = True

I hope you could find a better solution for this.


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

 
2/25/2005 4:01:14 PMAníbal Svarcas

Me again;
About my last post: "Exelent work..."
The performance bug only happens when using the component with a MainMenu in a MDI Form.
(If this comment was disrespectful, please report it.)

 
3/1/2005 12:55:45 PMKunal Mukherjee

Now I have updated the Project. The Problem while drawing shadows are now gone.

More changes will take place soon.
(If this comment was disrespectful, please report it.)

 
3/12/2005 4:13:55 PM

excellent but it doesn't support RTL.
(If this comment was disrespectful, please report it.)

 
3/16/2005 1:32:24 PMAndrea Minganti

Great piece of work, it really helped me!
(If this comment was disrespectful, please report it.)

 
4/8/2005 6:47:33 AM

It would be great if you could add a DLL again to your Zip file.
Thanks for this excellent menu!!
(If this comment was disrespectful, please report it.)

 
4/18/2005 11:06:24 AM

Ecelent job.
BUT I have found when you using this a contextmenu for the notifyicon, the menu does not appears properly. Could you see what's the problem or what propery I should play with? Thanks.
(If this comment was disrespectful, please report it.)

 
4/20/2005 6:29:27 AM

Great job (I use the updated version of your control)!
But I found a bug in localizable forms: when I change the language, the menubar doesn't resize itself in case of labels shorter or longer than original (I use a language switch without restart the form).
Is it possible to resolve this bug?
Thank
(If this comment was disrespectful, please report it.)

 
5/4/2005 12:03:05 PM

Nice job.

I found and fixed two problems. Your component was a life saver and I want to post the fixes in return of your good work.

Problem one:
The disabled menu icons displayed in the wrong place. Fixed with:

'make water mark of the picture
'ControlPaint.DrawImageDisabled(e.Graphics, img, width, height, SystemColors.GrayText)
'HEM 05-04-2005
'Fixed positioning of a disabled bitmap
ControlPaint.DrawImageDisabled(e.Graphics, img, x, y, SystemColors.GrayText)

Problem two:
When using the keyboard to navigate the menus and I switched form one sub menu to another the first menu item’s shading did not display. Fixed with:
'Draw selection rectangle
'HEM 05-04-2005
'Fixed missing shading when keyboard entry of left and right
DrawPictureArea(e, mi)
DrawSelectionRect(e, mi)

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

 
5/4/2005 12:04:29 PM

Ugg!

My post looks ugly!
(If this comment was disrespectful, please report it.)

 
5/4/2005 2:48:03 PMKunal Mukherjee

thanks a lot for the replies guys and my gratitude to the last thread owner for fixing up the two probs.

thanks a lot again.
(If this comment was disrespectful, please report it.)

 
5/18/2005 3:21:42 PMT304PK

Great Job! Keep the stuff coming. *****
(If this comment was disrespectful, please report it.)

 
5/19/2005 1:57:23 AM

Good Menu!
But it dosent support on right to left languages..
is there gonna be a right to left support in the future?

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

 
5/19/2005 8:04:08 AMJamsey Stevenson

Fantastic Work.
After opening a form as a modal dialog, using a context menu on the modal form. Closing the modal form and then using another context menu on the original form there is an error.
The control seems to lose all of the images in the image list being used.

line : 275 in KMMenuSkinner.vb

gr.DrawImage(m_ImageList.Images(GetMenuInfo(menu_item).imgIndex) ,
0, 0)
Specified argument was out of the range of valid values..

Good luck


5 globes from me..
(If this comment was disrespectful, please report it.)

 
5/19/2005 8:29:53 AMJamsey Stevenson

I think I've worked out what is going on.

I'm making this call

Private Sub mnuCtxComputerAdmin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCtxComputerAdmin.Click
Dim frm As New frmComputer()
frm.ShowDialog(Me)
If frm.Updated Then
' Do some things
End If
frm.Dispose()
End Sub

As you can see the frm is being disposed of right at the end of the call. For some reason it looks like your menu control is trying to hang on to the imagelist on frmComputer. So the next time I try to open a context menu I get the error 'Specified argument was out of the range of valid values'. It's easy enough for me to get round. All I do is reset the menus imagelist property to point back to ImageList2 like this :
KmMenuSkinner1.ImageList = ImageList2

Thanks

James

I'm trying to be nagative about this. I think it's terrific.

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

 
5/26/2005 10:14:05 AMJamsey Stevenson

That should read NOT trying to be nagative
(If this comment was disrespectful, please report it.)

 
6/14/2005 4:03:02 PMKunal Mukherjee

hey guys
wait patiently. new version will be here within 2-3 months.
(If this comment was disrespectful, please report it.)

 
6/14/2005 4:06:19 PMKunal Mukherjee

There seem to be a problem when using this together with a notify icon. This is caused by a known defect in the .NET framework, see the Microsoft KB article "The ContextMenu Control That Is Associated with the NotifyIcon Component Is Not Displayed When You Set the OwnerDraw Property of Menu Items in the ContextMenu Control to True" (http://support.microsoft.com/?id=827043) in regards to the problem.

Any workout regrading this problem are very much welcome.
(If this comment was disrespectful, please report it.)

 
10/18/2005 3:12:12 AMAlexandros

there seems to be a problem with Windows 2000. When i move down the mouse cursor
above the menu the menuitems are being
drawn correctly.
A white thin line is being drawn at the lower side of the menu item.
(If this comment was disrespectful, please report it.)

 
10/21/2005 3:29:25 PMJan from Belgium

Hey Kunal,
After trying the first version, I now tried the scond version.
Impressive !
But I have quite serious problems :
after changing "selectmenustyle" on the menuskinner, the mainmenu gets messed up : each menu item also gets a sidebar place for an image, and the text of all menu items is all over each other on the first menu item. And after a while, the menus on other programs (IPhotoPlus, PhotoEditor, ...) are not working properly any more.
You have any idea what is happening ?
And I seem to need this second version, because I use MDI forms, and the first version did not display decorated menu items for the MDI forms.
So, again, thanks for this great control, but can you please help me out with the final details to be able to use it ?
(If this comment was disrespectful, please report it.)

 
11/3/2005 5:04:29 AMHarry

This is a great tool! The only thing I'd like to comment on is that the menu bar seems to clip the left edge of the form (about one pixel). Is this easy to correct?

Looking forward to the next version!
(If this comment was disrespectful, please report it.)

 
1/11/2006 6:02:43 PMRoberto

I am trying to use this using VB 2005. Can you please advice how to do it.
(If this comment was disrespectful, please report it.)

 
3/27/2006 1:20:00 PMsam

Could u please provide one that would work for MDIs!!
(If this comment was disrespectful, please report it.)

 
3/29/2006 12:47:20 PMKunal Mukherjee

Heya Sam
I dont have any updates for the menus to work with MDIs. Now I am using .net 2.0 and the menu control is now menu strip control. So I did not worked on that menu project for a long time and that is why there is no updates any more.

Do one thing try searching the google with the keyword "Sandbar". thats a good menu component. It was free when I downloaded it I dont know about know. Give it a try.

Hope that helps,
Kunal
(If this comment was disrespectful, please report it.)

 
4/24/2006 12:37:04 PMSharon

Great menus! One problem I am having is setting the entire backcolor of the mainmenu. Using the MenuBarColor property of KmMenuSkinner1 I can set the backcolor behind the menuitems, but the rest of the menu remains the default white color. It obviously works in the your test project, so what am I missing?
(If this comment was disrespectful, please report it.)

 
4/25/2006 6:28:54 AMKunal Mukherjee

Actually I have not worked on this project for a long time. However Try to find some property through which you can set the backcolor of each menuitem. I think there is a provision for that. I wanted to make this control as much configurable as possible. So I am sure there is some property called "Backcolor" for each menuitem. Set this property to the desired color. Try it and let me know.
(If this comment was disrespectful, please report it.)

 
4/25/2006 4:52:44 PMSharon

Hi Kunal -
Thanks I did try this (changed the backcolor on KmMenuSkinner1 property of MenuItem1 and MenuItem2) and it does just as I mentioned above, colors both of these and leaves the remainder of the bar the default color. Also I am finding as Harry did that the color from the first menuitem's backcolor is overlapping slightly at the left side of the form. Is that an easy fix?
Thanks
Sharon
(If this comment was disrespectful, please report it.)

 
8/24/2012 4:28:39 PMGenedv

This menu does not work well with vs 2010
(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.