Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

*.GIF Animated Format

Status
Not open for further replies.

rstevep8

Programmer
Dec 21, 2000
10
SV
Anyone know an OCX control or Active X control to use the .gif pictures in Visual Basic 6.0?

Please help me in this.

Thank's

Steve Portillo.
 
You can display animated gifs using the webbrowser control found under Microsoft Internet Controls.

Here's some code - placed a webbrowser control & command button on a form.
This example also allows you to specify a background color.
Code:
Private Sub Command1_Click()

   Dim sHTML      As String
   Dim sBGColor   As String
   Dim sAniGif    As String

   sBGColor = "blue"         'change this string
   sAniGif = "c:\anigif.gif" 'change this string

   sHTML = &quot;about:<html><body bgcolor =&quot; &amp;  _
           Quote(sBGColor) &amp; &quot;><img src =&quot; &amp; _
           Quote(sAniGif) &amp; &quot;></html>&quot;

   WebBrowser1.Navigate2 sHTML

End Sub

'Here's the Quote function for completeness sake

Public Function Quote(sString As String) As String

   Quote = Chr(34) &amp; sString &amp; Chr(34)

End Function

Seasons Greetings
caf

 
Hi

You said WITHOUT the Webbrowser control but the file you've linked to uses the webbrowser control?

Since you've posted that it can be done in Visual Basic WITHOUT the Webbrowser control, I would've thought that you'd post or link to an example that does this WITHOUT the webbrowser control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top