View Single Post
Old June 21st, 2009   #23 (permalink)
@ruantec
Emu author
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,379
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)
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6

Last edited by @ruantec; June 21st, 2009 at 14:34..
@ruantec is offline   Reply With Quote