Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleQuickly view animated GIF files
Keywordsanimated GIF, GIF, view, viewer
CategoriesGraphics, Utilities, Files and Directories
 
Thanks to Neil Crosby.

Use Disk, Directory, and File controls to select a file for viewing. Display the GIF in the WebBrowser control.

 
Private Sub Dir1_Change()
    brwWebBrowser.Visible = False
    File1.Path = Dir1.Path
    frmBrowser.Caption = Dir1.Path
End Sub

Private Sub Drive1_Change()
    On Error GoTo errhand

    Dir1.Path = Drive1.Drive
    brwWebBrowser.Visible = False
    frmBrowser.Caption = Drive1.Drive
    Exit Sub

errhand:
    MsgBox ("Drive not ready.")
End Sub

Private Sub File1_Click()
Dim filename As String

    filename = File1.List(File1.ListIndex)
    If Len(File1.Path) = 3 Then
        Dim cartella As String
        cartella = Left(File1.Path, 2)
        cboAddress.Text = cartella & "\" & filename
    Else
        cboAddress.Text = File1.Path & "\" & filename
        DoEvents
    End If

    If mbDontNavigateNow Then Exit Sub
    timTimer.Enabled = True
    brwWebBrowser.Navigate cboAddress.Text
    DoEvents
    brwWebBrowser.Visible = True
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated