You are not logged in.
Pages: 1
Hi,
Using Delphi 7, I was using JvGIF to load gif images but are switching to SynGdiPlus. With JvGIF I was able to load a GIF image from the EXE using TJvGIFImage.LoadFromResourceName(hInstance, 'Logo', 'GIF'), but TGifImage.LoadFromResourceName(hInstance, 'Logo') doesn't work.
Logo := TGifImage.Create;
Logo.LoadFromResourceName(hInstance, 'Logo');
SPLLogo.Picture.Bitmap := MainLogo.ToBitmap; (SPLLogo is a TImage on a form)
Also tried...
SPLLogo.Picture.Graphic := TGraphic(MainLogo);
Can someone please help be get this working please. It just shows blank.
I also tried this as found on the forum with the same results...
SPLLogo.Picture.Graphic := TGifImage.Create;
TGifImage(SPLLogo.Picture.Graphic).LoadFromResourceName(hInstance, 'Logo');
I traced the code to TSynPicture.LoadFromResourceName where the line
if FindResource(Instance,PChar(ResName),RT_RCDATA) is equal to 0 so that is the problem. In the .rc file I have
Logo GIF SPLLogo.gif
Is that not correct? It works with TJvGIF.
Many thanks,
Ross.
Last edited by rlevis (2021-10-06 10:42:12)
Offline
Pages: 1