brunuu Posted December 11, 2015 at 12:42 PM Report Share #590570 Posted December 11, 2015 at 12:42 PM É um problema que já tenho algum tempo mas desta vez não posso arranjar outra solução. Mesmo que ponha a consola em Sleep e se carregar no teclado quando o sleep terminar vai aparecer o Input na linha o que não me da jeito nenhum. Por exemplo: Console.WriteLine("ABC") Thread.Sleep(um tempo qualquer) Console.ReadLine Se durante o tempo que está em sleep eu carregar nas teclas e quando acabar o sleep a consola vai mostrar as teclas que carreguei durante o sleep. Isto para mim não pode acontecer. Há alguma maneira de bloquar o utilizador de escrever. Link to comment Share on other sites More sharing options...
Solution HappyHippyHippo Posted December 11, 2015 at 01:01 PM Solution Report Share #590574 Posted December 11, 2015 at 01:01 PM Console.WriteLine("ABC") Thread.Sleep(um tempo qualquer) // limpa o buffer da consola while (Console.KeyAvailable) Console.ReadKey(true); Console.ReadLine 1 Report IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
brunuu Posted December 11, 2015 at 01:09 PM Author Report Share #590575 Posted December 11, 2015 at 01:09 PM Oh! Você de novo a salvar a coisa. Eu já tinha visto isso no stackoverflow mas não tinha funcionado e agora funciona por alguma razão. Obrigado. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now