Results 1 to 3 of 3

Thread: speeding

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2001
    Location
    HK
    Posts
    16

    speeding

    How to speed up the following program?
    When lots of image is loaded, it will hang, how to correct it?
    ____________________________________________________
    Function Load_image()
    For i = 1 To totalfile
    Load Image1(i)
    Load Label1(i)
    If totalfile > 32 Then
    VScroll1.Enabled = True
    changerate = Abs((totalfile - 32) / 8) + 1
    If changerate > 0 Then
    VScroll1.Max = -(changerate * 5)
    End If
    End If
    Call image_move
    Call check
    Next i
    For i = 1 To totalfile
    If File1.Pattern = "*.jpg;*.gif;*.bmp" Then
    Image1(i) = LoadPicture(Dir1.Path + special + File1.List(i - 1))
    End If
    ProgressBar1.Value = ProgressBar1.Value + 1
    Call label_move
    Call label_naming
    Next i
    end function

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    not sure u can speed it up, but u can make it not "freeze" by using a doevents


    VB Code:
    1. ProgressBar1.Value = ProgressBar1.Value + 1
    2. Call label_move
    3. Call label_naming
    4. DoEvents
    -= a peet post =-

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2001
    Location
    HK
    Posts
    16
    It aslso "freeze" when I using DoEvents and run it. The folder contains 360 jpg files.

    Actually, I am doing a program that function as ACDSee,
    but ACDSee can load the 360 jpg files very fast.

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