关键是在Main函数中处理,示例如下
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;

namespace
WinFormTest

{
static class Program

{

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)

{
foreach (string p in args)

{
MessageBox.Show("p=" + p);
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;
namespace
WinFormTest
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
foreach (string p in args)
{
MessageBox.Show("p=" + p);
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
