473,394 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Invisiable console application

I am trying to build a console application in C#.Net. This application
is suppose to run in background without user interaction. How can I
hide console to appear?

Nov 17 '05 #1
3 14997
Then you must make sure that you will run it as an service.

inpreet wrote:
I am trying to build a console application in C#.Net. This application
is suppose to run in background without user interaction. How can I
hide console to appear?

Nov 17 '05 #2
In case you're curious, see my response.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
There's a seeker born every minute.
- Dr. "Happy" Harry Cox

"Don Pinkster" <do**********@gmail.com> wrote in message
news:dl**********@news3.zwoll1.ov.home.nl...
Then you must make sure that you will run it as an service.

inpreet wrote:
I am trying to build a console application in C#.Net. This application
is suppose to run in background without user interaction. How can I
hide console to appear?

Nov 17 '05 #3
A Console application is an application that presents a console to the user.
The console is the user interface. Therefore, you can't, by definition,
write a console application that doesn't present a cosole to the user. What
you *can* do is write a class library that has a class to perform whatever
task you want to perform. Then you can create a Windows Application that
does not create an instance of a form, but in the Main() function, simply
creates an instance of the class in the class library and calls it to
perform the task.

If you need to be able to use the class in a Console as well, create a
Console application that does the same thing (employs the class library). A
nice trick is to create both the Windows application and the Console
application, and add parameters to the command for the Windows application
that enable it to run in "windowless" mode. What this would do is to either
spawn the Console application as a process, or run without spawning the
Console application, and simply perform the work itself.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
There's a seeker born every minute.
- Dr. "Happy" Harry Cox

"inpreet" <in*****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I am trying to build a console application in C#.Net. This application
is suppose to run in background without user interaction. How can I
hide console to appear?

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Job Lot | last post by:
How can I terminate console application in Try…Catch…Finally…End Try block so that code in Finally gets executed. If I use End statement Finally does not get executed. Following is my code...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
2
by: nss | last post by:
hi, I created web page ( .aspx) then i imported datagrid on that page with dataset. But when i launch the page on web server the datagrid is invisiable. Can someone help me how i can make it...
6
by: Mark Allison | last post by:
Hi, I have an application that I want to be to run in Console mode and GUI mode. If no params are entered, I want the GUI fired up, if params are entered, then go into console mode. I believe...
5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
17
by: MumboJumbo | last post by:
Hi I have a really basic question hopefully some can help me with: Can you write a (i.e. one) C# project that works from the cmd line and gui? I seems if i write a GUI app it can't write to...
6
by: tony | last post by:
Hello! When you have windows forms you have the same possibility as when you have a Console application to use Console.Writeln to write whatever on the screen. Now to my question: Is it...
10
by: Stephany Young | last post by:
When one uses the System.Diagnostics.Process.Start method to launch a common or garden Console application, one can set the WindowStyle property of the StartInfo object to ProcessWindowStyle.Hidden...
12
by: Dilip | last post by:
Hi All I have a server based C# console application. This application must hide its console window when its launched out on the field. So I dutifully P/Invoke'd FindWindow/ShowWindow...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.