« Answers 1.1.7 - Fixes… | Home | DevCon Hotel Scam Ale… »

Tip of day: Load GIF into WebImageView

If you need to load a GIF picture into a WebImageView, you need to build a WebPicture and put the GIF inside it:

// get some gif file dim f as FolderItem = SpecialFolder.Desktop.child("test.gif") // open GIF dim g as GIFMBS = f.OpenAsGIFMBS // get data for GIF file dim b as BinaryStream = BinaryStream.Open(f) dim s as string = b.Read(b.Length) // get picture dim fp as Picture = g.MakeFirstPicture // creates a new webpicture based on picture dim pic as new WebPicture(fp) // now fill the web picture pic.Data = s pic.MIMEType = "image/gif" pic.Filename = f.name // show picture in WebImageView me.Picture = pic
24 02 16 - 20:47
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.