Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7854293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:01:01+00:00 2026-06-02T20:01:01+00:00

I am writing a console application using Visual Studio and C#. I am constantly

  • 0

I am writing a console application using Visual Studio and C#. I am constantly printing out debugging information to the console window.

The program is fairly simple, it just queries several databases multiple times and stores the values in my central database. It does this just over 900 times in total. At the point when it is querying the databases, it will occasionally (and randomly) stall on the console window, and ceases to print out debugging information or go any further in the program.
The peculiar thing is, when I highlight the window and right click (to copy), this seems to kick the program back into life and it begins to work again!

Does anyone know what could be causing this? It’s the most peculiar behaviour I have ever seen in a program before!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:01:02+00:00Added an answer on June 2, 2026 at 8:01 pm

    If the user accidentally clicks into the black console window, the cursor changes to a filled white rectangle, and the app hangs, until another clic is made.

    It is a generic feature of the Console window when its “QuickEdit Mode” is enabled.

    In order to disable that feature, you should uncheck the “QuickEdit Mode” option of your app’s console window at run-time.

    Or disable it programmatically :

    // http://msdn.microsoft.com/en-us/library/ms686033(VS.85).aspx
        [DllImport("kernel32.dll")]
        public static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);
    
        private const uint ENABLE_EXTENDED_FLAGS = 0x0080;
    
        static void Main(string[] args)
        {
             IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;
             SetConsoleMode(handle, ENABLE_EXTENDED_FLAGS);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an opencv application to draw using laser beam using visual studio
I'm writing a console application program as httplistener and using it through jquery and
I'm writing a small program using CLR console application and when I write something
If we are writing about power-wise option - is using a console-based application in
I'm writing a console application in Visual Basic 2008 Express. I added several text
I'm writing an open source application uses some Symfony components, and using Symfony Console
I'm writing a console application which is looking up information about SSIS packages in
I am writing a Console application using C#, in which I am firing Print
I am writing a simple console application in LInux/C++ that accepts user input from
I am writing a console application using BDE 2006 and I want it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.