There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Problem when setting image in contextmenuStrip - Only windows XP
I have an issue.
When I run my sharpshell context menu on windows XP, then I got (i think GDI+) exception on this row, and I can't catch it:
itemMain.Image = Resources.favicon16xp.ToBitmap();
itemMain is a ToolStripMenuItem which is added to the ContextMenuStrip in protected override System.Windows.Forms.ContextMenuStrip CreateMenu()
On Windows 7, it's working.
My image (facicon16xp) is a 16x16 ico file (8 bit), but i also tried with png, 24 bit ico, bmp, etc....
I can't catch the exception, shell stops working, and I cant see anything on the Xp's event log...
If I comment out the line, then the context menu working on XP too.
The image's Build action is Resource and the Resource's build action is embedded resource.
Please let me know if it's a known issue. I's very frustrating and I have tried everything to resolve it, nothing worked.