Solved

How can I create a Visual C# GUI that will luanch and interact with a "C" Windows console application?

Posted on 2004-04-18
4
418 Views
Last Modified: 2008-02-07
I have a structured, multi-threaded, C, Windows console application that I would like to convert to OO C# with a GUI.  However, the approach I would like to take is to build the GUI first and have it interact with the existing consloe application which runs as an .exe.  I would like to send the messages that currently are sent to the stdout to the .Net GUI assuming minimal modifications to the console application.  I need to buy time to learn C# before converting the more complex console application.  I am having some success using VS.Net and building small GUIs.

Can I launch a Windows .exe from a .Net C# GUI and accomplish what I want to do?

Thanks for any help or advice you can offer.
0
Comment
Question by:lemcgee
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
dfiala13 earned 250 total points
ID: 10856018
Take a look at the System.DiagnosticsProcess namespace.  You can start up a process (exe, bat), read its stdout, etc...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassTopic.asp

0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10856285
Should be System.Diagnostics.Process class in the System.Diagnostics namespace
0
 

Author Comment

by:lemcgee
ID: 10856326
Thanks, I will give this a try.
0
 

Author Comment

by:lemcgee
ID: 10856516
This was just what I needed to get started.  I know that I will encounter other issues along the way to a complete solution but I am on my way.

Thanks!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question