Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6172283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:21:57+00:00 2026-05-23T23:21:57+00:00

I have 2 applications. One of them is console application, the other is normal

  • 0

I have 2 applications.
One of them is console application, the other is normal form application – both written in C#. I want to open (hidden from view) the console application form the windows form application and be able to send a command lines to the console application.

How can i do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:21:58+00:00Added an answer on May 23, 2026 at 11:21 pm

    You can start the background process

    ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.FileName = "Myapplication.exe";
    startInfo.WindowStyle = ProcessWindowStyle.Hidden;
    Process process = new Process();
    process.StartInfo = startInfo;
    process.Start();
    

    and after that use the Process.StandardOutput property

    // This is the code for the base process
    Process myProcess = new Process();
    // Start a new instance of this program but specify the 'spawned' version.
    ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(args[0], "spawn");
    myProcessStartInfo.UseShellExecute = false;
    myProcessStartInfo.RedirectStandardOutput = true;
    myProcess.StartInfo = myProcessStartInfo;
    myProcess.Start();
    StreamReader myStreamReader = myProcess.StandardOutput;
    // Read the standard output of the spawned process.
    string myString = myStreamReader.ReadLine();
    Console.WriteLine(myString);
    
    myProcess.WaitForExit();
    myProcess.Close();
    

    If you want to send commands to this process, just use Process.StandardInput Property

     // Start the Sort.exe process with redirected input.
     // Use the sort command to sort the input text.
     Process myProcess = new Process();
    
     myProcess.StartInfo.FileName = "Sort.exe";
     myProcess.StartInfo.UseShellExecute = false;
     myProcess.StartInfo.RedirectStandardInput = true;
    
     myProcess.Start();
    
     StreamWriter myStreamWriter = myProcess.StandardInput;
    
     // Prompt the user for input text lines to sort. 
     // Write each line to the StandardInput stream of
     // the sort command.
     String inputText;
     int numLines = 0;
     do 
     {
        Console.WriteLine("Enter a line of text (or press the Enter key to stop):");
    
        inputText = Console.ReadLine();
        if (inputText.Length > 0)
        {
           numLines ++;
           myStreamWriter.WriteLine(inputText);
        }
     } while (inputText.Length != 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two flex applications and i want to pass the data from one
I have two ASP.NET MVC web applications. One of them logs unhandled exceptions to
I have a Java application which requires certain software (one of them being Perl)
I have created a play application and have some models. One of them contains
Many applications have grids that display data from a database table one page at
I have two simple console applications to integrate nservicebus. One is a publisher, the
We have an application that has one or more text console windows that all
here's my scenario: I have three projects: two DLLs and one console application, let's
I have two applications in my project 'test' the applications are one.mxml and two.mxml
I have clustered applications that requires one of the nodes to be designated as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.