Click to See Complete Forum and Search --> : Console Application vs. Windows Application major differences.


stardv
October 13th, 2005, 12:16 PM
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

tal
October 13th, 2005, 08:46 PM
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/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontontserviceapplications.asp

enjoy...
Tal.

stardv
October 14th, 2005, 10:58 AM
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