CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    Console Application vs. Windows Application major differences.

    I was just wondering if someone can please explain the major difference between setting you application to run as Console application vs. Windows Application
    If no forms are used. As far as I understand Windows Application runs message pump when console one does not, right?

    The reason I came across this question is because I have an application that has no form but I wan it to display errors in a MessageBox. If I set an application to Console
    It displays console what I do not need (by the way , is there any way to avoid displaying console window when running console application?). If I set it to windows applications MessageBox is not set as top and does not display as top window but just appears in toolbar.

    Please explain me the reasoning behind my issues , I just want to understand in depth how it all works.

    Thanks
    "We act as though comfort and luxury were the chief requirements of
    life, when all that we need to make us happy is something to be
    enthusiastic about."

    - Einstein

  2. #2
    Join Date
    Oct 2005
    Posts
    9

    Re: Console Application vs. Windows Application major differences.

    for your first question i will ask another question:
    As a Windows user... could you do things like configuring stuff in your os through a console in the same easy way you configure things through a windows application? i dont think so... even most of the Linux distrubs are trying to make their os as GUIable as they can.. becuase it is easier for the users...

    about the message box at the console application - yes, you can add reference to System.Windows.Form and use MessageBox on your console application...

    and yes, your application doesnt have to communicate with the user... it can work as a service (background process) without poping a console windows...

    check this out: http://msdn.microsoft.com/library/de...plications.asp

    enjoy...
    Tal.

  3. #3
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    Re: Console Application vs. Windows Application major differences.

    Tal,

    I know what windopws servioce is and build quit a few of them. As far as Console and Windows App question I was looking for depper answer what is going on behind the scene appart from displaying Console Window. It looks like both way run message loop, and you can display windows and so on.

    Aslo I was looking to see if there is any way to run Console App without displaying Console.

    You answer was on the shalow level, not waht I was looking for, but thanks wanyway
    "We act as though comfort and luxury were the chief requirements of
    life, when all that we need to make us happy is something to be
    enthusiastic about."

    - Einstein

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured