|
-
Aug 29th, 2000, 02:09 PM
#1
Thread Starter
New Member
I am using VB6. I am interacting with an activex control.
I have tried using the timer control, the sleep function, but nothing seems to work as I need it to.
Here is what does work(in English):
total = TotalNumImages
i = 1
Do While i <= total
Call CopyImage(x, xx)
****This is an asynchronous call meaning it MUST have enough time to complete before going thru the loop again.
'sleep(15000)
MsgBox "WAIT"
****If I count to 25 in my head while the WAIT msgbox is on the screen, the images copy without problem. I don't know why this works, except that perhaps the system is waiting on a user response it can finish processing the Call.
i = i + 1
Loop 'While
The sleep function only copies about half the images. I think this is due to the fact that the copy has not completed when the sleep function starts.
Any suggestions would be greatly appreciated! I would like this automated. Perhaps the OK button on the msgbox gets clicked after a certain amount of time. I have tried using the timer control, but have been unsuccessful. All I want is for the application to wait a bit before finishing the loop.
Thank you very much for your time!
-
Aug 29th, 2000, 02:31 PM
#2
Fanatic Member
Do me a favor
(Will sound odd!!) It may or may not work
Put a DOEVENTS after the sleep or something
Let me know....
Thanks
-
Aug 29th, 2000, 02:41 PM
#3
Monday Morning Lunatic
Why not turn CopyImage into a synchronous function? It'll make your life easier. Anyway, why not have CopyImage set a global status variable, indicating that it's finished. It could also send an event, like the Winsock control.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|