Response. buffer = true
'Application caching technology.
Dim lostnum
'Prevent dmax from being too large and dstep from being too small.
Dim shownum
Delayshow (dstep, dmax)
Sub delayshow (dstep, dmax)
'Dmax indicates the number of dmax (Steps) to be processed before the entire process can be completed. dstep indicates the approximate percentage of processed dmax (Steps) to the whole process.
Dim total
'Show all images.
Dim dtemp
'Transition variable.
Total = 100
Dtemp = dstep
Dstep = dstep + lostnum
If (dstep * total)/dmax <1 then
'The image is not painted when the screen is not connected to 1%, and the variable lostnum is used to store the total number of unpainted images, so that you can continue the next call to this process.
Lostnum = lostnum + dtemp
Else
For ccc = 1 to fix (dstep * total)/dmax)
'Get integer.
Response. Flush
Shownum = shownum + fix (dstep * total)/dmax)
Lostnum = 0
'Display the cached image. The variable shownum is used to store the currently painted image.
End if
End sub
Sub showlost ()
For ccc = 1 to (100-shownum)
Response. Write (" ")
'If the remainder cannot be painted 100 times, showlost () will display the remaining unpainted items as processed.
Next
Response. Write "<BR>"
Response. Flush
End sub