gustierng
asked on
running a app with no window or console in the background
Is there an elegant way of running a background process without having a console or window?
i.e. not having something like a while true in main
Something tailor made for this perhaps, but not a windows service.
i.e. not having something like a while true in main
Something tailor made for this perhaps, but not a windows service.
One way, is simply create a C# method, goto the program.cs file, and remove the "Application.Run()" function, and in this function (the main method), add whatever you like
ASKER
what kind of application would you start with?
ASKER
Hi
I have tried to see what you have suggested but do not understand. Please clarify.
thanks
I have tried to see what you have suggested but do not understand. Please clarify.
thanks
>>Is there an elegant way of running a background process without having a console or window?
Why exactly are you trying to make a process that is not visible in a window or console? The only reason that I see is to make a process that is malicious. Could you clarify what you are trying to achieve with this process?
>>i.e. not having something like a while true in main
You could simply use threads which wait until they have a job to do
Why exactly are you trying to make a process that is not visible in a window or console? The only reason that I see is to make a process that is malicious. Could you clarify what you are trying to achieve with this process?
>>i.e. not having something like a while true in main
You could simply use threads which wait until they have a job to do
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The purpose is to make a .net remoting app on a localhost with services on different processes. Therefore no need for a console or window. Also other platforms such as unix allow you to run programs easily in the background without the annoyance of a command window. So, have been looking or a way to do this.
ASKER
When I run the code above, it just runs and exits immediately.
ASKER
ok, using Application.Run() keeps it open