|
-
December 13th, 1998, 04:14 PM
#1
detecting key and mouse clicks inside a loop!?
Im trying to detect either a mouse click or a keypress while runing a for/next loop. is there a command that will allow me to check for such events while inside a loop.
for x=1 to infinity
'i want to check for a mouse or keypress here
next
as you probably know while aloop is running all operations suspend as far as
normal VB event go and they are not detected.
Thanks.
-
December 14th, 1998, 03:07 AM
#2
Re: detecting key and mouse clicks inside a loop!?
Hi
First you need to insert DoEvents in the loop. This makes sure your program can process any messsages.
Second, you have to need a boolean to see if the mouse is clicked or a key is pressed (set it to true if it is -> do this in the Click and KeyDown events)
Check in the loop if the boolean is true.
This should work.
Hope this helps
Crazy D
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
|