Click here to Skip to main content
15,913,758 members
Home / Discussions / C#
   

C#

 
GeneralRe: Copying the current executing program to destination Pin
DaveyM6924-May-09 0:45
professionalDaveyM6924-May-09 0:45 
AnswerRe: Copying the current executing program to destination Pin
fly90423-May-09 11:00
fly90423-May-09 11:00 
GeneralRe: Copying the current executing program to destination Pin
Rajdeep.NET is BACK23-May-09 16:44
Rajdeep.NET is BACK23-May-09 16:44 
GeneralRe: Copying the current executing program to destination Pin
Dave Kreskowiak23-May-09 17:27
mveDave Kreskowiak23-May-09 17:27 
GeneralRe: Copying the current executing program to destination Pin
fly90424-May-09 0:10
fly90424-May-09 0:10 
QuestionConversion of visio files(.vsd) to .pdf files Pin
NarVish23-May-09 6:42
NarVish23-May-09 6:42 
AnswerRe: Conversion of visio files(.vsd) to .pdf files Pin
Douglas Troy23-May-09 7:09
Douglas Troy23-May-09 7:09 
QuestionDisplaying the output of a console application in a windows form. Pin
neoflame23-May-09 4:48
neoflame23-May-09 4:48 
Hi, I want to create an interface for a few applications that run with a command line interface (video codecs, to be specific). I've got it sort of working but after I run one application with it, it just stops displaying the output.

Code on the "Run App" Button: (pro_App is the name of my process component)
pro_App.StartInfo.FileName = txt_App.Text;
pro_App.StartInfo.Arguments = txt_Args.Text;
pro_App.Start();
pro_App.BeginOutputReadLine();
but_Run.Enabled = false;

Events:
private void pro_App_OutputDataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
    if (!String.IsNullOrEmpty(e.Data))
    {
         rtx_Display.AppendText(Prefix + e.Data); // Append output to rich text box
         Prefix = Environment.NewLine;
    }
}

private void pro_App_ErrorDataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e)
{
     if (!String.IsNullOrEmpty(e.Data))
     {
         rtx_Display.AppendText(Prefix + "Error: " + e.Data);
         Prefix = Environment.NewLine;
     }
}

private void pro_App_Exited(object sender, EventArgs e)
{
     but_Run.Enabled = true;
     rtx_Display.AppendText(Prefix + "<Application Finished>";
     Prefix = Environment.NewLine;
     pro_App.CancelOutputRead();
}

Component Properties:
this.pro_ShellApp.EnableRaisingEvents = true;
this.pro_App.StartInfo.CreateNoWindow = true;
this.pro_App.StartInfo.Domain = "";
this.pro_App.StartInfo.ErrorDialog = true;
this.pro_App.StartInfo.LoadUserProfile = false;
this.pro_App.StartInfo.Password = null;
this.pro_App.StartInfo.RedirectStandardError = true;
this.pro_App.StartInfo.RedirectStandardOutput = true;
this.pro_App.StartInfo.StandardErrorEncoding = null;
this.pro_App.StartInfo.StandardOutputEncoding = null;
this.pro_App.StartInfo.UserName = "";
this.pro_App.StartInfo.UseShellExecute = false;
this.pro_App.SynchronizingObject = this

Any ideas? Thanks.
AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 5:06
sitebuilderLuc Pattyn23-May-09 5:06 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 5:56
neoflame23-May-09 5:56 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 6:02
sitebuilderLuc Pattyn23-May-09 6:02 
AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 6:06
sitebuilderLuc Pattyn23-May-09 6:06 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 10:11
neoflame23-May-09 10:11 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 10:19
sitebuilderLuc Pattyn23-May-09 10:19 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 11:04
neoflame23-May-09 11:04 
AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 11:25
sitebuilderLuc Pattyn23-May-09 11:25 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 11:32
neoflame23-May-09 11:32 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 11:37
sitebuilderLuc Pattyn23-May-09 11:37 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 12:44
neoflame23-May-09 12:44 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 12:51
sitebuilderLuc Pattyn23-May-09 12:51 
QuestionDataGridView Cursor Move. Pin
Ashwani Dhiman23-May-09 2:38
Ashwani Dhiman23-May-09 2:38 
AnswerRe: DataGridView Cursor Move. Pin
Eddy Vluggen23-May-09 3:42
professionalEddy Vluggen23-May-09 3:42 
QuestionCrystal report print by coding Pin
KIDYA23-May-09 2:12
KIDYA23-May-09 2:12 
AnswerRe: Crystal report print by coding Pin
_Maxxx_24-May-09 16:59
professional_Maxxx_24-May-09 16:59 
QuestionHow to move a drawn ball by Threading? Pin
pcsience23-May-09 0:01
pcsience23-May-09 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.