Questions tagged [console-application]

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix.

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix. A user typically interacts with a console application using only a keyboard and display screen, as opposed to GUI applications, which normally require the use of a mouse or other pointing device. Many console applications such as command line interpreters are command line tools, but numerous text-based user interface (TUI) programs also exist.

As the speed and ease-of-use of GUI applications have improved over time, the use of console applications has greatly diminished, but not disappeared. Some users simply prefer console based applications, while some organizations still rely on existing console applications to handle key data processing tasks.

7241 questions
13
votes
3 answers

Multiple Consoles in a Single Console Application

I have created a C# Project which has multiple console applications in it. Now my question is: Is it possible to display multiple consoles when I run one application? if yes, how? Lets say, I have a Test Application, which is the main application. I…
Harsh
  • 173
  • 1
  • 3
  • 11
13
votes
1 answer

"Undefined symbols for architecture x86_64" when setting up a very basic Unit Testing for a console application

I'm new to Objective-C and XCode and consider me mentally challenged when discussing compiled languages in general. I have no idea how linkers work and the amount of build settings in every IDE I've had the discomfort of working with simply scares…
ellmo
  • 906
  • 7
  • 18
13
votes
2 answers

Starting Windows Application vs Console Application via Cmd

I have curiosity question regarding Console vs Windows Application when running the application from the Cmd, calling the exe directly. If the application is compiled as a Console Application (will refer to it as my ConApp), when running the app via…
Heinrich
  • 2,144
  • 3
  • 23
  • 39
13
votes
3 answers

what is the difference between win32 application, windows form application and console application?

I want to know what is the difference between windows form application, win32application ana console, i know that both the windows form application and win32 application is gui tool, but i want to know when to use one over the other one, and could I…
sara
  • 256
  • 1
  • 3
  • 15
13
votes
1 answer

cout<< "привет"; or wcout<< L"привет";

Why cout<< "привет"; works well while wcout<< L"привет"; does not? (in Qt Creator for linux)
Minimus Heximus
  • 2,683
  • 3
  • 25
  • 50
13
votes
5 answers

How do I create a Resources file for a Console Application?

I'm trying to use an embedded resource in a console application, but apparently console applications don't come with a resource file automatically. How do I create a resources file for my console app?
Joe
  • 3,804
  • 7
  • 35
  • 55
13
votes
1 answer

How to determine if GraphicsEnvironment exists

I have an application that needs user input for password. What i want to do is to either read the password from console (if the OS supports one e.g unix) or display a JOptionPane and ask the user to enter his password (if the OS supports graphical…
nikkatsa
  • 1,751
  • 4
  • 26
  • 43
13
votes
2 answers

Windows 7 taskbar state with minimal code

What would be the shortest code to set the state of a Windows 7 taskbar button for a known window handle? The goal is to write a console utility that changes the progress and state (colour) of the console window taskbar item from a batch script.…
ygoe
  • 18,655
  • 23
  • 113
  • 210
13
votes
7 answers

How do I only allow number input into my C# Console Application?

Console.WriteLine("Enter the cost of the item"); string input = Console.ReadLine(); double price = Convert.ToDouble(input); Hello, I want the keyboard buttons, A-Z, brackets, question mark, etc to be disabled. I want it…
Sarah
  • 183
  • 1
  • 1
  • 10
12
votes
3 answers

Getting Service Container in Symfony 2 Console Command gives "getKernel() on a non-object"

In the configure() function, I tried to get the service container class SetQuotaCommand extends ContainerAwareCommand { protected function configure() { parent::configure(); die(get_class($this->getContainer())); PHP Fatal…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
12
votes
3 answers

Re-Open WPF Window from a Console application

I want to open a WPF Window from a Console application. After referring to this post, it works fine. The problem is: When the user closed the WPF Window (manually), it can no long be re-opened from the Console, throwing the exception message:…
TomCaps
  • 2,497
  • 3
  • 22
  • 25
12
votes
11 answers

C# Console Application - Keep it running

I am about to develop a console application that will be required to continually run and carry out work at specific times. My question is what is are best methods or practices to keep your application alive? My thought were: A loop that never…
None
12
votes
1 answer

Why when compiling .NET Core console application we end up with both dll and exe files?

I have noticed that both dll and exe files with the name of the project are created on Windows when compiling a .NET Core console application. Why is that? In full .Net framework only the exe file would be created.
mark
  • 59,016
  • 79
  • 296
  • 580
12
votes
2 answers

How to get and inject the IHostApplicationLifetime in my service to the container (Console App)

Following this answer, I want to inject the IHostApplicationLifetime in my class to shutdown properly when the method StartAsync is over. But I don't know how to get the applicationLifetime from the console and Inject it through de built-in dotnet…
12
votes
2 answers

How do I use command line arguments in my C# console app?

I am writing a url shortener app and I would like to also create a console app with C# to push the URLs to a WCF service which I have also created. WCF app will shorten the url on this URI; http://example.com/shorten/http://exaple.com so what I…
tugberk
  • 57,477
  • 67
  • 243
  • 335