From: Viv on
Hi all,

I created a console application which has to run until CTRL+C is used.
Everything works fine besides the fact that if one clicks with the
mouse into the command prompt window the application pauses. How can I
get rid of this? I mean my application shouldn't get paused whatever
the user is doing. Can I somehow disable this behaviour?

Thank you in advance,
Viv
From: Igor Tandetnik on
Viv wrote:
> I created a console application which has to run until CTRL+C is used.
> Everything works fine besides the fact that if one clicks with the
> mouse into the command prompt window the application pauses.

This is the standard behavior of the console window. It allows you to select and copy text out of it. It's not a problem with your application.

> How can I
> get rid of this?

Click on the icon in the top left corner of the console window. Select Properties from the menu (or Defaults if you want to change the settings for all console applications systemwide). On the Options tab, uncheck QuickEdit mode.

> I mean my application shouldn't get paused whatever
> the user is doing.

Then don't show the console at all.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
From: Uwe Sieber on
Igor Tandetnik wrote:
> Viv wrote:
>> I created a console application which has to run until CTRL+C is used.
>> Everything works fine besides the fact that if one clicks with the
>> mouse into the command prompt window the application pauses.
>
> This is the standard behavior of the console window. It allows you to select and copy text out of it. It's not a problem with your application.
>
>> How can I
>> get rid of this?
>
> Click on the icon in the top left corner of the console window. Select Properties from the menu (or Defaults if you want to change the settings for all console applications systemwide). On the Options tab, uncheck QuickEdit mode.
>
>> I mean my application shouldn't get paused whatever
>> the user is doing.
>
> Then don't show the console at all.

Yes, otherwise the user can press the Pause key
which makes the console stop on next output.


Uwe


From: Viv on
Hi guys,

Thanks for your answer. Thing is I would like to have the console
because I print once in a while a message to the console. I also need
the CTRL+C for stopping the application. This is why I kept the
console, but the fact that the application can be by accident paused
by the user is bad because the user won't even be aware of the fact
that he paused the application.

Viv


On Fri, 26 Feb 2010 07:31:43 -0500, "Igor Tandetnik"
<itandetnik(a)mvps.org> wrote:

>Viv wrote:
>> I created a console application which has to run until CTRL+C is used.
>> Everything works fine besides the fact that if one clicks with the
>> mouse into the command prompt window the application pauses.
>
>This is the standard behavior of the console window. It allows you to select and copy text out of it. It's not a problem with your application.
>
>> How can I
>> get rid of this?
>
>Click on the icon in the top left corner of the console window. Select Properties from the menu (or Defaults if you want to change the settings for all console applications systemwide). On the Options tab, uncheck QuickEdit mode.
>
>> I mean my application shouldn't get paused whatever
>> the user is doing.
>
>Then don't show the console at all.