Is it possible to show an animated GIF?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Is it possible to show an animated GIF?

Post by Peter »

Hello,

i want to show a Wait-Window with an animated GIF:

Image

Code: Select all

Enumeration
  #WaitWindow
  #WaitWindowImage
EndEnumeration

Procedure Loaded(Type, Filename$, ObjectId)
  SetGadgetState(#WaitWindowImage, ImageID(ObjectId))
EndProcedure

BindEvent(#PB_Event_Loading, @Loaded())

OpenWindow(#WaitWindow, #PB_Ignore, #PB_Ignore, 150, 150, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess)
ImageGadget(#WaitWindowImage, 0, 0, 128, 128, 0, #PB_Image_Border)
LoadImage(0, "loader.gif")
It seems, that SpiderBasic sets the background-image - Attribute so the GIF is not animated:

Image

Greetings ... Peter
User avatar
eddy
Posts: 124
Joined: Thu Mar 27, 2014 8:34 am

Re: Is it possible to show an animated GIF?

Post by eddy »

SpiderBasic did a DataToURL conversion.
In your screenshot, the file extension seems to be wrong: "image/png" instead of "image/gif"
Post Reply