Results 1 to 3 of 3

Thread: Aaron Young

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 1999
    Location
    Freeport
    Posts
    204

    --------------------------------------------------------------------------------
    There is a way to make an animated GIF appear on your Form without it looking like you're using the WebBrowser Control, but of course, you do...

    Place a WebBrowser Control Within a Picturebox Control..
    I'm getting a Error Sub Are Function not defined on WebBrowser1.Move

    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

  2. #2
    New Member
    Join Date
    Feb 2000
    Posts
    12
    You don’t need a picture box. Try this tip from ZDTV. I found it works very well:

    Display animated GIFs in VB

    While the Picture ActiveX control offers a great way to display
    graphics, it only shows the first image in an animated GIF. To
    display a fully animated GIF, without rebuilding the entire graphic
    frame by frame, you can use the WebBrowser control (just keep in
    mind that this control isn't available to machines without IE 3.0
    or greater). To do so, select the Microsoft Internet Controls
    component. When you do, the WebBrowser control appears on Visual
    Basic's toolbar. Drop the control onto a form, then in the form's
    Load() event place the following code:

    WebBrowser1.Navigate "C:\Internet\anim.gif"

    Where the filespec points to a valid animated GIF path or URL. When
    you run the program, Visual Basic displays the GIF.

    Unfortunately, the WebBrowser also displays a right-hand scroll
    bar--probably not what you want for a decorative image. Believe it
    or not, you can turn this scrollbar off just like you would normally
    via HTML, as in:

    WebBrowser1.Navigate "about:<html><body scroll='no'><img
    src='D:\Internet\anim.gif'></img></body></html>"

    Now when you run the form, Visual Basic displays the image sans
    scrollbar.



  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 1999
    Location
    Freeport
    Posts
    204

    Thank I have Webbrowser

    It works But i want to center the gif picture in the middle of the webbrowser so I place it on A small button. I just having fun right now Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width