I want to load an embedded gif file into a GOImage and can't seem to get it to work. (See commented out code); When refering to the actual file name it works as shown below. However i want the gif file to be distributed as an embedded resource. Can you tell what I am doing wrong. The bitmap variable seems to be loaded properly.
imageList.Images[0] look good in the debugger. That is it is not null and the size of the bitmap is set correctly (16x16). I did not actually see the bitmaps image. I also tried
img.ImageList = imageList;
img.Index = 0;
The only other this is i am not adding to a document but a GoGroup which works fine when I use the bitmaps file name. Also any problem using a GIF format but adding it as Bitmap format.
Bitmap bitmap = new Bitmap(assembly.GetManifestResourceStream(gifPath));
The imageList1 in my sample code above is created by dragging an ImageList item from the VS Toolbox to the Design window in a WinForms app. maybe if you try that simple approach…
Gif isn’t the problem. .NET Bitmap handles gif, etc.