mr moose
Oct 31st, 1999, 07:35 PM
How can I run an animated gif in VB?
Aaron Young
Oct 31st, 1999, 08:14 PM
You can use a Webbrowser control within a Picturebox to fake an Animated Gif box..
Place a Webbrowser Control within a Picturebox, so the Picturebox is the Container, for this example also place a CommonDialogBox on the Form:
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
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
Crazy D
Oct 31st, 1999, 09:09 PM
At www.codeguru.com/vb (http://www.codeguru.com/vb) , ActiveX section, is a free ocx available for download to display animated gifs.