console-application

Creating a Trapezoid using a character inputted by the user. (Console App)

I am trying to create a trapezoid using user inputted options. I know my code may not be the best way but so far it works! My problem is i need the base of the trapezoid to be touching the left side of the output window. What am i doing wrong? #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { ...

What to put in Spark SetPageBaseType setting

I use Spark to output some HTML straight from a console app. I have the following view classes in my project. //A shared view that all other views should use public abstract class SharedView : AbstractSparkView { public string BasePath = string.Empty; } public abstract class ApplicationView : SharedView { public Application App...

List.Add(this) inside of a class

I created a class awhile back. I used List.Add(this) inside of the class so I could access the controls I created later. It seemed to be very useful and I do not know how to create controls (more than one in the same parent control without a predefined limit) and access them later. I was looking for Add(this) on the internet and couldn...

how can I embed an assembly into a console application without ILMerge?

There are a lot of posts on here about this, I'm using this code from another SO post and placing a delegate assignation in my Main() method. None of the other posts have directly answered my question. I've got my third party assembly embedded as a resource but when I fire up the app: I'm getting a TypeInitializationException with a...

How to detect C# project type and / or how to detect Console availability.

Hello. I have two Windows services written in C#. One service is "Console Application" and second one is "Windows Application" (can't change it). Both service applications can be executed in few modes (depending on command line arguments and Environment.UserInteractive flag): when (Environment.UserInteractive == false) and... when ...

Input event loop in a console application

Hi, I'm trying to make a little console application that is able to deal with keystrokes as events. What I need is mostly the ability to get the keystrokes and be able to do something with them without dealing with the typical stdin reading functions. I tried to check the code of programs like mplayer, which implement this (for stoppin...

Ignore carriage returns in scanf before data.... to keep layout of console based graphics with conio.h

I have the misfortune of having use conio.h in vc++ 6 for a college assignment, My problem is that my graphic setup is in the center of the screen... e.g. gotoxy( getcols()/2, getrows()/2); printf("Enter something"); scanf( "%d", &something ); now if someone accidentally hits enter before they enter the "something", then the cur...

how to add an external text file into project as a resources

i m devlopuing one consol application in c#.net and in this i need one text file which is resides in local disc but i wanna make it dynamic and add that file in the project as a resources so when i create final exe of my project and place it any where it works proparly without having that file in local disc. pls help me regarding this i...

Changing startup object of console application at runtime

Assuming I've got several unrelated classes in separate files with a main method in each. Currently project is a console application and I just change a startup object in IDE to run respective main which instantiates respective class from IDE. Out of curiosity would it be possible to change the startup object dynamically at runtime some...

Display an image as a splash screen when running Windows batch file, vbscript/wscript or Python console script

Any ideas how I can display an image file (bmp or png) centered on the screen as an application splash screen when running a Windows console script based on a batch file, vbscript/wscript or Python console script? I'm not interested in a wxPython solution - that's too much overhead just to implement a cosmetic feature like a splash scre...

Unkillable console windows

I'm developing an OpenGL based 2d simulation with GLUT under Visual C++ 2008, sometimes when I have an assert() or unhandled exception and break into the debugger, the GLUT display window closes, but the console window remains open.They just cant be killed!!! They do not show up with Task manager, Process Explorer or any other tool, I c...

Getting Visual Studio macros in console app

In a Visual Studio extension, you can get the default include paths for all projects with C# code like: String dirs = dte2.get_Properties("Projects", "VCDirectories"); where dte2 is the Visual Studio application object. Usually, those directories contain macros like $(INCLUDE). You can expand those macros by looking at dte2.Solution...

Wrapping a C# service in a console app to debug it.

I want to debug a service written in C# and the old fashioned way is just too long. I have to stop the service, start my application that uses the service in debug mode (Visual studio 2008), start the service, attach to the service process and then navigate in my Asp.Net application to trigger the service. I basically have the service ...

Redirect Console.Write... Methods to Visual Studio's Output Window While Debugging

From a Console Application project in Visual Studio, I want to redirect Console's output to the Output Window while debugging. ...

.NET Console TextWriter that Understands Indent/Unindent/IndentLevel

Does anybody have or know of a TextWriter for the Console that understand how to indent/unindent and has the ability to set the indent level. ...

Console app showing message box on error

I am trying to integrate with a vendors app by calling it with command args from c#. It is meant to automate a process that we need to do with out needing anyone to interact with the application. If there are no errors when running the process it works fine. However if there are any errors the vendors application will show a message box...

How do I start a second console application in Visual Studio when one is already running

Hi All, I am working through some examples in a WCF book. There is a Host project and Client project within a single solution. Both are console applications. The Host is the startup app, but the Client app doesn't seem to open the Console like the book says. Book says while the Host is running, run the Client. The Run button is disabled...

How to create a console application that does not terminate?

Hello, In C++,a console application can have a message handler in its Winmain procedure.Like this: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hwnd; MSG msg; #ifdef _DEBUG CreateConsole("Title"); #endif hwnd = CreateDialog(hInstance, MAKEINTRESOURCE(ID...

how to execute console application from windows form?

I want to run a console application (eg app.exe) from a windows form load event. I'v tried System.Diagnostics.Process.Start(), But after it opens app.exe, it closes it immidiately. Is there any way that I can run app.exe and leave it open? ...

Displaying images in a console application?!

I have a console application which screen scrapes some data, and now I need to do image comparisons. If the images are different, I want to show the images to the user. What's the best way to display two images during the execution of a console application? I'm assuming I would use some sort of inter-process communication to send informa...