Loop until the user presses a key

How run a loop until a key is pressed

Page 1 of 1

1 Replies - 2277 Views - Last Post: 17 November 2009 - 02:51 PM Rate Topic: -----

#1 rgarber  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-October 09

Loop until the user presses a key

Post icon  Posted 17 November 2009 - 02:48 PM

I have code in a loop, for example a while loop. My question is, how can I use the while loop to execute the code until the user presses a key? I have played around with ReadKey(true) as explained in a post I found on another site but it did not work the way suggested. Is there an easy way to do this or must a seperate thread be used and notified upon key press?
Is This A Good Question/Topic? 0
  • +

Replies To: Loop until the user presses a key

#2 Smurphy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 35
  • View blog
  • Posts: 367
  • Joined: 07-July 08

Re: Loop until the user presses a key

Posted 17 November 2009 - 02:51 PM

First off, welcome. Here at Dream in Code we like to see an effort on your part.
:code:
and we will be glad to help you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1