I have a VS 2008 app which i am upgrading to VS 2010.
I was using NetAdvantage 2010.2 in VS 2008. I am now using NetAdvantage 2012.1 in VS 2010
I have a UltraToolbarsManager. I place images into a ImageList and then retrieve the images from the ImageList to put the image onto the tools on my ribbon.
In VS 2010 the image is not as good as a VS 2008.
The top icon is how it should appear (and does appears in VS 2008), the bottom icon is how it does appear (in VS 2010 without converting to a bitmap)
This is the code for the bottom icon where it returns the icon to add to the ImageList. (this was the original code in VS 2008)
public Icon Copy() { return EM.Shared.Images.RibbonMenus.Edit.Resources.copy; }
This is the code for the top icon.
public Image mmCopy() { return EM.Shared.Images.RibbonMenus.Edit.Resources.copy.ToBitmap(); }
My question is why do i need to convert the iccon to a bitmap? I didn't have to do the is in VS 2008?
Hi,
I made a tests with VS 2012 and VS 2008 and both of them have the same behavior regarding Resources images / icons.
In my tests with VS 2010 , I have three images with different extensions (.ICO .Img and .BMP) in my resource file and I`m able to used the code below:
public Image Test()
{
// test with Icon
return UltraGridRegExpressionReplaceCellText.Resource1.Automotive128;
}
or
// test with Bitmap
return UltraGridRegExpressionReplaceCellText.Resource1.Untitled;
// test with Image
return UltraGridRegExpressionReplaceCellText.Resource1.su37_2333;
Please let me know if you think that I misunderstand your questions or if you have any further questions.
Regards