第一个程序:
using System.ComponentModel;
using System.IO;
{
string target = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName)
+ @"\TCPDownAndCOM.exe";
Process.Start(target,"你好");
}
第二个程序,在Program.cs文件中。
using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;
namespace TCPDownAndCOM
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[MTAThread]
static void Main(string[] args)
{
GPS_zw.ClassPublicFunction.strPar = args[0];
Application.Run(new Form1());
}
//static void Main()
//{
// //strPar = args[0];
// Application.Run(new Form1());
//}
}
}