Currently when I use the scrollbar on my c# console app, it seems to halt/interrupt the application until I "let go" of the scrollbar.
Is there a way to keep this from happening?
Currently when I use the scrollbar on my c# console app, it seems to halt/interrupt the application until I "let go" of the scrollbar.
Is there a way to keep this from happening?
Here's an old post I'm just quoting from, which explains the Pause when using the scrollbar in cmd prompt :
"Technically, only displaying output is suspended while you hold the scrollbar: the console subsystem temporarily stops reading from the output buffer and displaying it. However, the process remains running, and said output buffer fills up very quickly, which makes all further write()'s "block" for as long as the buffer is full. This is what makes the process appear to pause.
(Note that there are two distinct components – the console window and the programs running inside. The "Command Prompt" is only the cmd.exe command interpreter, but the window along with scrollbars is displayed by CSRSS."
Here's the link to the post : https://superuser.com/questions/344262/windows-command-prompt-pause-during-mousedown
You will need to run your long-running code in another thread, then writing to the console when need be - see this post: Using .NET BackgroundWorker class in console app