|
-
May 2nd, 2009, 12:57 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Windows and Tming Routine Not Working Together
I have a timer routine (basically just a timing loop) that moves shapes around the screen. The problem is that it isn't in sync with Windows (Vista). If a Windows background program runs (like an antivirus) the screen goes gray. The timing routine still runs but the display is shut off. Only when the shapes are done moving does the screen return to normal (but I didn't actually see the shapes move). Another good example of my issue is when I finish debugging and press the Start button, again I don't see the shapes move, I just see a grayed out screen with the cursor in "busy" mode.
All the other VB.NET programming I've done doesn't assume so much control as this timing loop. I've never had to worry about coordinating a routine with other windows functions. What's the trick to getting this stuff to work together smoothly?
Last edited by neef; May 2nd, 2009 at 03:40 PM.
Intermediate Level Programmer Extraordinaire 
-
May 2nd, 2009, 02:12 PM
#2
Re: Windows and Tming Routine Not Working Together
I think you're basically saying the loop and everything works, you just don't see it do anything. If that's that case you can put:
Code:
Application.DoEvents()
In your loop so that you can see it moving the shapes around.
-
May 2nd, 2009, 03:39 PM
#3
Thread Starter
Hyperactive Member
Re: Windows and Tming Routine Not Working Together
That's all I needed thanks. It's nice to learn a simple solution for problems once and a while.
Intermediate Level Programmer Extraordinaire 
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
|