console-application

Windows 2008 Task Scheduler Problem

I've created simple .NET 2.0 Console application. Reads DB, sends emails and writes result to subfolder named "logs" as a .TXT file. Application works when i run it manually. But task scheduler can not able to run it. When i looked the history i saw "Task Scheduler successfully finished "{46794881-039f-4c37-8c5b-af70def503ce}" instanc...

Console App Mouse-Click X Y Coordinate Detection/Comparison

I have a game that I am working on in a C# console application, purely as practice before going on to better methods. As opposed to using something such as a Windows Forms App, which has button functionality built in, I am endeavoring to grab the cursor position (which I know how to do) and compare it to a number of area's inside a conso...

How to deploy a console application

I have a console application, that when I run (from within vs.net) it takes a while as it is a long running process. I want to continue coding in vs.net, and maybe even spawn multiple instances of the console application. How to best deploy this on my desktop cmputer? Is this a good approach: create a folder: /myConsole/ then subfold...

Subsonic on a Console application

Can I use the Subsonic on a console application? If so where should I have all the Web.config details like ConfigSections entry, Subsonicservice etc? Any help is highly appricated ...

Hide Title Bar of Program using API

Its possible remove a window console title bar using c# and windows api, if yes howto? Please. ...

Compile to a stand-alone executable (.exe) in Visual Studio

how can I make a stand-alone exe in Visual Studio. Its just a simple Console application that I think users would not like to install a tiny Console application. I compiled a simple cpp file using the visual studio command prompt. Will the exe work even if the .NET framework is not installed? I used native C++ code. ...

.NET exception doesn't get passed from class to main program

I created a simple console application using C#. It creates an instance of a class and calls one of the class' methods. This method contains a try-catch block to catch exceptions of the type System.Net.WebException and rethrow it so that the main method can catch it and act appropriately. When I execute the compiled application the excep...

Refactoring advice/ideas needed

Hi all, I was looking for ideas on improving the following code static void Main(string[] args) { bool validInput1 = false; string input1 = string.Empty; bool validInput2 = false; string input2 = string.Empty; bool validFilePath = false; string filePath = string.Empty; try { Console.WriteLine("...

Output values of xml file in a text file with format

How can I make a C# console program reads the attributes of an xml file then output it to a text file in the format: textbox.Settings.Keywords.Add("attribute") where attribute is the attribute. A sample of the xml file: <Keywords> ... <Keyword name = "if" /> <Keyword name = "else" /> ... </Keywords> ...

How to receive the Windows messages without a windows form

I am trying to write a class library that can catch the windows messages to notify me if a device has been attached or removed. Normally, in a windows forms app I would just override the WndProc method but there is not WndProc method in this case. Is there another way I can get the messages? ...

Creating a Folder in C#, Applying Permissions, But access is still DENIED?

So I have this code below that creates a Directory and gives ASPNET permissions on the folder created. But when I run The Webclient.Downloadfile method, it says the folder created is still access denied.. Ive also just created a folder on C:/ and tried applying permissions my self and see what I get. But I still get access denied. Ca...

How do I detect when output is being redirected?

I have a Win32 application written in C that can have its console output via printf() redirected to a log file. It would be nice if I could have my app. detect if it had been started with or without a redirect '>'. Any ideas? ...

how to bind a windows console application with java application ?

i have an executable program (.exe) writen in c++ and run on windows console and i have a java swing applecation , so i want my java application to interact with the console app (send input and get output) . but how to do that ? ...

Ruby and console output

It is possible, generally, by means of Ruby library to output a symbol at specific location on a common Windows console screen, which seems to be 80x25 ? The problem came up with the need to draw a specific 'tree' structure like this, for example: │ ├──x──y──z │ │ │ ├──a──b──c │ │ │ └──e──f──g │ └──u──v──o ...

HttpUtility.UrlEncode in console application

I'd like to use HttpUtility.UrlEncode in a console application, VB.NET, VS 2010 Beta 2. System.Web.HttpUtility.UrlEncode(item) Error message: 'HttpUtility' is not a member of 'Web'. In this question Anjisan suggests to add a reference to System.Web, as follows: In your solution explorer, right click on references Choose "add refer...

How to terminate child processes when a c# console application is aborted?

I have a console application that spawns other win32 processes using WMI ManagementClass.I have a requirement when a user kills the console application through proc explorer or by pressing ctrl+c ,the application should terminate all the child processes it created.What is the best way to achive this? ...

Setting Code Access Policy (CAS) on console application running over network

I have a console app written in .NET 2 that uses reflection to dynamically load Assembly files, instantiate an instance of that Assembly, and invoke members of it. I had this app running very smoothly on our current servers, but we're now migrating to a new host, which is a 64-bit machine running Server 2008. The code that is executed, r...

using qt : how to build a gui ontop of a console application ?

i have a console application that generated from bison (a parser) and i want to build a simple gui for it so i can send input from this gui to the console and get output from the console into the gui . i tried to do that using java process class but it doesnt work for me , please help me to do that using qt . ...

Can you have a keylistener in a java console application?

Can you have a keylistener in a java console application without messing with JNI? Will jcurses do this for me (I couldn't find it in my searching.) Thank you. ...

Can I get copy/paste functionality from a C# Console Window?

I am developing a console application in C#, and was wondering if there was a way to get the "copy-paste" or "mark-paste" functionality into my application, similar or identical to that of the standard Windows command prompt. Is this a wild goose chase or a simple application variable? ...