Home > Blockchain >  Clicking on command window seeming halts program execution, how to prevent this?
Clicking on command window seeming halts program execution, how to prevent this?

Time:03-17

I just started a simple text program in C (MSVS) that outputs to the command window, it is a simple timer that counts up by 1 every second. When I click on the command window (inside of it, on the blank text) it appears to halt the program execution, until I stroke a key, click off the window, or the title bar. Is it possible to prevent this?

Normally in the title bar it says "C:/.../program.exe", and when I click in the window it says "Select C:/.../program.exe".

CodePudding user response:

You have selected text in the window, the window is expecting you to do a copy operation. The console window stopped accepting new info from the app while you have stuff selected. It does this trying to be helpful, (if you are copying text you dont want to have to chase it round the screen)

People also use this as a quick way to freeze an apps output (a replacement for the less used 'scroll lock')

Press ESC to unselect and resume running

  • Related