subbu558006

I¡¯m facing few issues in the migrated .NET solutions

In ExcelAddin & AccessAddin , the ¡®StdPicture¡¯ from VB6 has been replaced by ¡®System.Drawing.Image¡¯ by the migration tool.

But, few of the properties for StdPicture are not available with System.Drawing.Image.

I tried to find the suitable match for those properties in .NET but no success!

The missing properties are as per below:

Public Sub CopyBitmapAsButtonFace(ByVal picSource As System.Drawing.Image, ByVal clrMaskColor As System.Drawing.Color)

picSource.Handle

picSource.Type and,

picSource.Hpal

Type and handle is not a member of drawing.image namespace

can u help me in this




Re: Visual Studio Tools for Office error

Helmut Obertanner

Hello,

convert the Image into a Bitmap - there you can use some Methods like this:

Image img = Image.FromFile ("C:\\test.jpg");

Bitmap bmp = (Bitmap)img;

bmp.GetHbitmap();

ImageFormat format = bmp.RawFormat;

Hope this helps,

greets, Helmut