I don't know of a command prompt control, but you can simulate the same kind
of thing using Process class. I happen to have a class that allows you to
simulate command line. Here it is.
public class ExecutableLauncher
{
public static string Run(string exeName, string argLine)
{
StreamReader outputStream = StreamReader.Null;
string output = "";
try
{
Process newProcess = new Process();
newProcess.StartInfo.FileName = exeName;
newProcess.StartInfo.Arguments = argLine;
newProcess.StartInfo.UseShellExecute = false;
newProcess.StartInfo.CreateNoWindow = true;
newProcess.StartInfo.RedirectStandardOutput = true;
newProcess.Start();
outputStream = newProcess.StandardOutput;
output = outputStream.ReadToEnd();
newProcess.WaitForExit();
}
catch
{
throw;
}
finally
{
outputStream.Close();
}
return "\t" + output;
} // internal static string Run(string exeName, string argLine)
} // public class ExecutableLauncher
============================
Hayato Iriumi (hi*****@hotmail.com)
Blog:
http://www.vbaspcoder.com
"Stephen Woolhead" <st*****@perfectphase.com> wrote in message
news:uK**************@TK2MSFTNGP15.phx.gbl...
Anyone know where I can get a command prompt control? Something like the
command window in visual studion that I can add my own commands?
Thanks
Stephen.