View Single Post
Old June 21st, 2009   #22 (permalink)
S.T.A.R.S.
 
S.T.A.R.S.'s Avatar
 
Join Date: Jan 2006
Location: Planet Earth...
Posts: 593
Exclamation

This is all really great and you have no idea how much I appreciate your help,but it didn't really help me in the contextMenu control.I tried the following:

foreach(Control control inthis.Controls)
{
if(control is MenuItem)
{
control.BackColor=Color.Red;
}
}

I will try something else to see if that will do the trick...
By default the first created button in the contextMenu control is called "menuItem1",and here instead of the "MenuItem" I tryed to type "menuItem1",but then I get an error that says:" 'TEST.Form1.menuItem1' denotes a 'field' where a 'class' was expected".
Take a look at these pictures bellow to see what I exactly want to do:

Attached Images
File Type: jpg 1.JPG (179.4 KB, 4 views)
File Type: jpg 2.JPG (147.1 KB, 6 views)
File Type: jpg 3.JPG (124.0 KB, 4 views)
File Type: jpg 4.JPG (144.0 KB, 3 views)
__________________
GOODBYE FOREVER EVERYONE...
S.T.A.R.S. is offline   Reply With Quote