0

I want to pass the UserID from my project to another project exe. I call second project with these codes.

using System.Diagnostics;
private void MenuItemClickHandler(object sender, EventArgs e)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = @"\\server1\Lawyer\Lawyer.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = CurrentUser.UserID.ToString();
Process.Start(startInfo);
}

How can I pass the UserID of my project to second project that I called (Lawyer)? Thanks so much

Mina Msr
  • 1
  • 1
  • 2
    what problems are you having? The 2nd project must be coded to accept/read the parameters given to it. – Ahmed ilyas Dec 17 '14 at 12:20
  • This seems to be the way to go. i see no problems with this code. What does the main method of Laywer.exe look like? – Timothy Groote Dec 17 '14 at 12:22
  • I have main project that calls other projects,like a desktop,I want to use the UserID and Pass that users write to enter the main project and pass them to the projects that call from main project without login form. – Mina Msr Dec 17 '14 at 13:02

0 Answers0