Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i make loop delays?

Status
Not open for further replies.

coolbass

Programmer
Nov 7, 2002
11
PH
hello!

this is my simple problem about delay loops.
i have a loop statement but i can't make a delay in updating the display. i want to know how to use delays inside a loop statement while using UpdateData(FALSE) within the loop. Sleep() statement doesn't work in this delays.

thnx.
 
Why doesn't the Sleep() function work? Perhaps because the loop also pauses?
Another alternative is to simply keep track of the time (in milliseconds) using the GetSystemTime() function and implement your own loop-timing control mechanism from that.
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
but my another problem is that the loop executes and the Sleep() function performs after the loop....
 
Hmmm, I thought you wanted the pause 'inside' the loop - perhaps you should post the code and describe the exact problems so we can pin point it and come up with a solution for you. :)
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
yes, i want to pause inside the loop. im only want to perform display UpdateData() with an edit box but iwant to use a pause within the loop of "for statement"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top