开发者

How to give users a certain time to enter something? (VB.Net)

开发者 https://www.devze.com 2022-12-31 10:04 出处:网络
I\'m making a speed game in VB.Net (Console Application) and users have a certain time to press a certain key. So how can I give the Console.ReadKey 开发者_开发知识库function a timeout without just wa

I'm making a speed game in VB.Net (Console Application) and users have a certain time to press a certain key. So how can I give the Console.ReadKey 开发者_开发知识库function a timeout without just waiting until a key was pressed?


You should use a timer. When the user selects the correct key you can disable it. If the user is to then choose a different key you can just reset it.

0

精彩评论

暂无评论...
验证码 换一张
取 消