Borislav, thank you. Would there not be a way to slow down the sampling of Inkey() itself?
I ran your code, being unfamiliar with DOEVENTS as a newcomer to vfp7 and it simply oscillated between 47-50% cpu
Before I give up on this loop, I'll search for a way to diminish the sampling rate for keyboard entry.
Maybe vfp has such a command, or maybe it's available in C
But without such a functioning structure, my light bar menu and file browse won't work.
The READ command doesn't hang up cpu
so it seems reasonable to expect a way for INKEY() to be used without taking over the cpu
But I do realize we could sometimes see this effect in DOS
with such loops
Oh well, I have a great little lightbar routine but it doesn't seem feasible to use it. Now I know why I see so many hanging hour-glasses on the net.
I'm gonna find a way to make this program work. Even if I have to drastically change it, the effect is what I want.
I want my own versatile light bar menu. Anybody got one?
Borislav, thank you!!! I should spend more time on the fine print. I shall endeavor to emulate you. Borislav Borissov has told me what was in the books but I didn't take time to experiment with and try. Like my son says, the details, dad,
the details!
I do not know how it happened, but first couple times I tried a variation like that, the thing still hung with 50%
lb_sel=INKEY(10) works just fine..... jumps from nearly 0% to 4%, but that's progress. And extremely helpful.
BORISLAV, thank you for taking the time to tell me this.
And yes, I substituted that into the whole program and it works without eating cpu time, and the whole program still works.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.