PDA

Click to See Complete Forum and Search --> : Animated GIF images in VB


Dec 15th, 1999, 09:41 AM
Is it possible to display animated GIF images, and if yes how?
Thanks for your help

Crazy D
Dec 15th, 1999, 02:43 PM
You can use the webbrowser control, or check out www.codeguru.com/vb (http://www.codeguru.com/vb) activex section (if I remember well...), there's a free ocx which can show animated gifs.

Dec 15th, 1999, 10:56 PM
HI,
I had the same question and posted it sometime back, may be 2 days back. There was one person by name Aaron answered my question. He had sent me a piece of code, which should help u also.

The answer to my question was:

Add a Picturebox to a Form, place a WebBrowser Control Within the Picturebox, add a CommonDialogbox Control..

code:

Private Sub Command1_Click()
On Error GoTo Load_Cancel
With CommonDialog1
.CancelError = True
.DialogTitle = "Open an Animated GIF"
.Filter = "GIFS (*.GIF)|*.GIF"
.ShowOpen
WebBrowser1.Navigate .FileName
WebBrowser1.Move ScaleX(-12, vbPixels, vbTwips), ScaleY(-19, vbPixels, vbTwips), Width, Height
Picture1 = LoadPicture(.FileName)
Picture1.AutoSize = True
End With
Load_Cancel:
End Sub

u can avoid common dialog box, if u know filename with full path.