C#系统注销功能
来源:互联网 发布:淘宝衣服洗过会被发现 编辑:程序博客网 时间:2024/05/01 22:51
- 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]);
- }
- }
- }
---------------方法二
//点击注销按钮事件里面写:
if
(MessageBox.Show(
"您确定要注销登录吗?"
,
"提示"
, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Application.Exit();
System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
}
0 0
- C#系统注销功能
- C#注销或系统关机等事件
- c#注销
- C#实现关机、重启、注销功能 2009-2-20
- XP系统中关机、注销、重启功能
- c语言实现系统关机注销等功能
- C#接收Windows系统的关机(注销)事件
- C# 实现系统关机、注销、重启、休眠、挂起
- C# 实现系统关机、注销、重启、休眠、挂起
- C#实现系统关机、重启、注销等操作
- android实现注销功能
- Android注销功能
- Android注销功能
- c# 注销多行
- 登陆系统自动注销
- 系统注销消息
- 简单实现windows系统普通或强制关机重启注销的功能
- android如何实现注销功能
- 清除浏览器默认表单边框/背景特效和下拉菜单背景
- Linux/UNIX的scp命令用法详解
- iOS7/8 UIButton高亮状态延迟问题全解
- 【jQuery】利用lazyload.js延迟加载技术应对多图杀猫的单一页面
- Android(Lollipop/5.0) Material Design(二) 入门指南
- C#系统注销功能
- Android 开发笔记——通过 Intent 传递类对象
- 运维工程师必备技能
- 个人博客
- cocos2d-x 3.x LuaBinding之LUA_FUNCTION(只为记录)
- javaday23-IO练习题
- android scrollview嵌套listView和gridView的问题。
- Linux指令--文件和目录属性
- dubbox学习之路(一)