View Single Post
Old June 21st, 2009   #25 (permalink)
S.T.A.R.S.
 
S.T.A.R.S.'s Avatar
 
Join Date: Jan 2006
Location: Planet Earth...
Posts: 593
Quote:
Originally Posted by @ruantec View Post
mmmm i think i´ve finally got you lol... anyways that was one of the reasons why i hated .net and C# in the past because the old visual studio was just too stupid and didn´t had stuff you need.. anyways there are several ways to do that... but(now it comes) its not a simple task to do if you are not experienced.

here are the two ways to go:

1. by using the "SetBkColor" API which requires a HDC of each menuItem and a color value(both of them are long numbers just in case).
2. by using a DrawingBrush or a Brush you can draw custom rectangles on each item and so create even animations or change the color of each item.

now in the following pic from you i´ve seen all you need to embedded and draw the items as you want(check out the red marked area)


custom events can be embedded when the form is initializing by doing this for example(i´ll use the two properties available as shown in your pic):
Code:
     this.mymenuItem.OwnerDraw = true;
     this.mymenuItem.Text = "MymenuItem";
     this.mymenuItem.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.DrawItem);
     this.mymenuItem.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.MeasureItem);
where "this.DrawItem" and "this.MeasureItem" are custom events created by you in order to draw the required rectangles or animations on each item...

now the bad news.....

none of those two options are easy todo and there are several things you have to take in mind including api management and a good knowledge of what you´re doing. if i get some free time i´ll probably provide you an example... i just hope you can understand what´s the idea behind..

now last but not least.... i know i´ve asked that several times but why do you care that much about VS2002??? if you ask me i would drop it because its a waste of time(My opinion)
An example would be great!If you get some free time I would be very grateful if you make one
Well the reason why I use Visual C# 2002 is because many things are harder to make and on that way I am forced to learn how to make custom,even though I suck at it still xD
Like this contextMenu control.In Visual C# 2002 I NEED to learn how to make my own otherwise I do not have a choice like I had in Visual C# 2005 or 2008.I will probably need few years to learn doing that lol....
__________________
GOODBYE FOREVER EVERYONE...

Last edited by S.T.A.R.S.; June 21st, 2009 at 21:09..
S.T.A.R.S. is offline   Reply With Quote