Results 1 to 10 of 10

Thread: Radial Busy GIF

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Radial Busy GIF

    I was looking for a simple rotary graphic to indicate that a program was busy performing a task. I found such an image at this Web site:
    http://www.ajaxload.info/
    You can change the color combinations to produce and download the Animated GIF file. I have included 2 circular busy GIFs, one with a white background and one with a light yellow background.

    Unfortunately, VB6 does not directly support animated GIF files. Based on an Animated GIF Control by Jen Sam Lam, I put together the attached User Control. An animated GIF is a layered structure consisting of a number of frames. Because none of the picture based controls in VB6 support the layered structure, it is broken up into the individual frames in an Image array. In this case there are 8 frames controlled by a timer.

    The individual frames are converted into a temporary file and loaded to the image array. I was wondering if there was a more direct way of loading the individual frames. Feedback is welcome.

    J.A. Coutts

    Updated: 06/20/2020 - See later post for details
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by couttsj; Jun 21st, 2020 at 09:27 AM.

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: Radial Busy GIF

    Edit: Ooops, didn't notice this is in the CodeBank already. Good work!

    cheers,
    </wqw>

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: Radial Busy GIF

    BusyGIF would produce a permission error when the executable it was used in was loaded into the "Program Files" directory. This was caused by trying to create a temporary file in the same directory as the executable. The proper place for a temporary file is the "Temp" directory, and the program has be adjusted to do that. As well, code was added to stop and start the animation by clicking on the status label.

    J.A. Coutts

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: Radial Busy GIF

    With help from dilettante:
    https://www.vbforums.com/showthread....ated-GIF-image
    I simplified BusyGIF using "quartz.dll". This library should be available on all systems since Win 7.

    J.A. Coutts
    Attached Files Attached Files

  5. #5
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Radial Busy GIF

    webbrowser is good for gif

  6. #6
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Radial Busy GIF

    maybe windows mediaplayer support gif?

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Radial Busy GIF

    Quote Originally Posted by couttsj View Post
    This library should be available on all systems since Win 7.
    Did some looking. ActiveMovie (DirectShow) came as part of Windows beginning with Win98 and could even be installed in Win95.

  8. #8
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Radial Busy GIF

    i put some sample about:webbrowser,DirectShow,ANIGIF.OCX (Animation GIF Control)
    you can try
    vb6 Show Gif Movie by ActiveMovie control(DirectShow),WebBrowser-VBForums
    https://www.vbforums.com/showthread....ow)-WebBrowser

    Code:
    Private Sub Form_Load()
        WebBrowser1.Navigate App.Path & "\ajax-loader2.gif"
        WebBrowser1.Visible = False
    End Sub
    
    Private Sub cmdStart_Click()
        lblStatus.Caption = "Connecting!"
        WebBrowser1.Visible = True
     
    End Sub
    
    Private Sub cmdStop_Click()
        lblStatus.Caption = "Status"
        WebBrowser1.Visible = False
    End Sub
    
    Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
        With WebBrowser1.Document.body
            .Style.border = "none"
            .Scroll = "no"
            .leftMargin = 0
            .topMargin = 0
      
            WebBrowser1.Width = .scrollHeight * Screen.TwipsPerPixelX
            WebBrowser1.Height = .scrollHeight * Screen.TwipsPerPixelY
            
    '        WebBrowser1.Left = lblStatus.Width - WebBrowser1.Width
    '        WebBrowser1.Top = lblStatus.Top
    '        lblStatus.Height = WebBrowser1.Height
            
            WebBrowser1.Left = lblStatus.Width - WebBrowser1.Width - 50
            WebBrowser1.Top = lblStatus.Top + 50
            lblStatus.Height = WebBrowser1.Height + 100
        End With
    End Sub
     
    
    Private Sub byAniGif_Click()
    Form1.Show
    End Sub
    Attached Files Attached Files
    Last edited by xiaoyao; Mar 16th, 2021 at 10:49 AM.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: Radial Busy GIF

    Quote Originally Posted by xiaoyao View Post
    i put some sample about:webbrowser,DirectShow,ANIGIF.OCX (Animation GIF Control)
    you can try
    Yes, "Gif by WebBrowser" will work, but I am interested in using as few resources as possible. My latest version (BusyGIF2) uses 2.5 MB of memory when running as an executable. If I strip everything out of your "Gif by WebBrowser" program but form2, it uses 20.5 MB of memory when running as an executable. This is probably due to the size of the library file in use.
    13,881,856 ieframe.dll
    1,501,184 quartz.dll

    J.A. Coutts

  10. #10
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: Radial Busy GIF

    yes,if use miniblink or webkit.ocx,may only 3-8m
    If you need home page animation or video, this is also a way.

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