« MBS Xojo / Real Studi… | Home | The Cancel problem wi… »

Tip of day: Animated GIF in Real Studio Web Edition

You can use animated GIF files in your applications made with Real Studio web edition. It's a nice way to do some lightweight animation and all browser support it.

You should not use the build in picture class directly. They would convert your GIF to a just one picture without animation and later convert it to PNG. Instead you must feed GIF file directly to a WebPicture and assign it to a WebImageView. Like in this sample code from an WebImageView open event:
Sub Open() dim w as new WebPicture dim f as FolderItem = SpecialFolder.Desktop.Child("test.gif") dim b as BinaryStream = BinaryStream.Open(f) dim s as string = b.Read(b.Length) w.MIMEType = "image/gif" w.Filename = "test.gif" w.Data = s me.Picture = w End Open
The biggest plugin in space...
29 05 13 - 17:32