CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010

    Console window disappearing DURING EXECUTION

    Hi all! Thanks for taking the time to read this. I'm debugging a console app that basically watches over and controls the actions of other third party apps. Since there is no user input needed, I figured console was the way to go instead of forms.

    After an hour or so of running, the console window just diappears. Gone from the taskbar, nothing in the task tray -- just gone. VS still shows the program to be locked in debugging mode, my debugging output still shows in VS, and the things the program does are still getting done. The process is still visible and actively getting resources in the task manager. Basically, everything is working fine, EXCEPT for the fact that the console window is gone.

    For the life of me, I can't figure out why this happens. It's be a GOOD thing once I'm finished debugging, but it kinda sucks for now because I lose access to a lot of the Console.WriteLine stuff I made visible to help with testing.

    Thanks in advance for any help or information you can provide. Obviously, a search for "console app window disappears" doesn't help, since it brings up a bazillion hits on people not pausing after execution. This is a totally different beastie. Thanks again!!

    PS - using VS2008 targeted to 3.5 --whoops, sorry!
    Last edited by mrgr8avill; May 16th, 2010 at 08:40 AM. Reason: forgot cardinal rule of versioning

  2. #2
    Join Date
    Jan 2006
    Fox Lake, IL

    Re: Console window disappearing DURING EXECUTION

    Write the statements to the Event Viewer, and create a SERVICE. They are for apps that REQUIRE NO USER INTERACTION.

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Apr 2010

    Re: Console window disappearing DURING EXECUTION

    I've read this a few times, and I can't help but chuckle every time because I picture you with your face twitching a little bit as you typed your response. Got a bit of a "thing" for people not using services when they should, huh, Cappy???

    Pulling your leg and keeping it light. Sorry I was a thorn in your "why don't they do things the way they SHOULD do them" side! As a certifiable idiot, I was ignorant about services. Looked into it and seems like the way to go. So you're totally right. Uptight, but right! Have a cold one and try to chill and forget dummies lke me and the pain we inflict on our computers =)

    Thanks again for your response. Cheers!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.