troubleshooting Question

Loop troubles

Avatar of n96radsb
n96radsb asked on
Visual Basic Classic
4 Comments1 Solution221 ViewsLast Modified:
I have problems with loops...

I have a program that read pixels from another application. That works fine so far.
Depending on what happens in the other application I want do things in my own program.
If for example some pixels in the other application become blue I want to increment an integer in my program. basically just monitor what happens in another application.

I was thinking about using a loop. and in the loop have calls to functions and subs. In the example below status and analyze

Private Sub runLoop()
While (True)
   Sleep (500)
   statusText.Text = status
end sub

This doesnt work very good, my computer becomes unstable after awhile and I have to restart visual basic.

What is a good solution for this. I want to be able to control the speed of the loop, so that it calls the functions and subs like twice every second.

thanks in advance

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros