Link to home
Start Free TrialLog in
Avatar of waelali
waelali

asked on

C# Assign bigger images (bigger than default 16x16 icons) in ContextMenuStrip

Hi
How to set bigger images instead of the default 16x16 iconsin ContextMenuStrip.

Attached is an image - and it will explain more. The icons that are circled with red color should be changed to 48x48  icons.

How can I do that ??

Wael
1.JPG
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

How are you referencing the images?  Is there an ImageList?
Avatar of waelali
waelali

ASKER

yes ofcourse. imagelist.
but could not resie the image susing that .
I have tried but could not see any effect-
What is the ImageList.ImageSize set to?  It should be 48 x 48, if you have images with that size.
Avatar of waelali

ASKER

i have did that but nothing was changed
Avatar of waelali

ASKER

I have done the following

ImageList myImages = new ImageList();
myImages.Images.Add(Image.FromFile("..\\..\\..\\TabStripApp\\Resources\\Add.jpg"));
myImages.ImageSize.Height = 48;
myImages.ImageSize.Width = 48;


but I got a compilation error:

Error 1 Cannot modify the return value of 'System.Windows.Forms.ImageList.ImageSize' because it is not a variable
 
May you can help??
 
Wael
ASKER CERTIFIED SOLUTION
Avatar of waelali
waelali

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial