using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace WindowsFormsApplication8
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
public static void Main(string[] args) //加参数,接收值,当通过拖拽文件启动程序时,则参数数组的第一个值就是这个文件的路径
{
if (args.Count()>0)
{
MessageBox.Show(args[0]);
}

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2021-11-25
  • 2022-01-08
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案