using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace Cancel
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] strArg)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(strArg));
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace Cancel
{
public partial class Form1 : Form
{
string[] strargs;
public Form1(string[] strarg)
{
InitializeComponent();
strargs = strarg;
}
private void button1_Click(object sender, EventArgs e)
{
// MessageBox.Show();
Process sprs = new Process();
sprs.StartInfo.FileName = Application.ExecutablePath.Trim();
sprs.StartInfo.Arguments = "注销回来的";
sprs.Start();
Process.GetCurrentProcess().Kill();
}
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show(strargs[0]);
}
}
}
WinForm系统注销功能
最新推荐文章于 2020-06-28 22:44:49 发布