c#中的窗口关闭事件如何活
来源:互联网 发布:java中的initcause方法 编辑:程序博客网 时间:2024/05/19 07:42
//关闭事件
protected override void WndProc(ref Message msg)
{
const int WM_SYSCOMMAND = 0x0112;
const int SC_CLOSE = 0xF060;
if (msg.Msg == WM_SYSCOMMAND && ((int)msg.WParam == SC_CLOSE))
{
if (MessageBox.Show("是结束程序吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
if (uin_wx == null || uin_wx.Count == 0)
return;
this.Close();
ArrayList values = new ArrayList(uin_wx.Values);
foreach (WxBean bean in values)
{
bean.logout();//登出所有微信号
}
}
return;
}
base.WndProc(ref msg);
}
protected override void WndProc(ref Message msg)
{
const int WM_SYSCOMMAND = 0x0112;
const int SC_CLOSE = 0xF060;
if (msg.Msg == WM_SYSCOMMAND && ((int)msg.WParam == SC_CLOSE))
{
if (MessageBox.Show("是结束程序吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
if (uin_wx == null || uin_wx.Count == 0)
return;
this.Close();
ArrayList values = new ArrayList(uin_wx.Values);
foreach (WxBean bean in values)
{
bean.logout();//登出所有微信号
}
}
return;
}
base.WndProc(ref msg);
}
0 0
- c#中的窗口关闭事件如何活
- c# 如何实现子窗口关闭父窗口也关闭
- c# 如何实现子窗口关闭父窗口也关闭
- c#禁止窗口关闭方法(重写关闭事件)
- 如何关闭word2007中的Research窗口
- 如何获取extjs中的关闭的事件
- 判断窗口关闭事件
- IE窗口关闭事件
- 捕获关闭窗口事件
- javascript 关闭窗口事件
- 关闭窗口事件
- 窗口关闭事件
- 浏览器窗口关闭事件
- 窗口关闭触发事件
- 截取窗口关闭事件
- 窗口关闭事件
- 关闭窗口触发事件
- java窗口关闭事件
- 并发概览
- Spark streaming & storm流式计算框架对比
- 工作思考20170315
- 203. Remove Linked List Elements
- L3-004. 肿瘤诊断
- c#中的窗口关闭事件如何活
- FishC笔记—20 讲 函数:内嵌函数和闭包
- 接口关系下的多态
- 深入理解在Android中线程池的使用
- TensorFlow MNIST 测试
- 程序设计方法学———— 三天打鱼两天晒网(日期判定)
- TI-RTOS 内核概述,开发蓝牙功能必须要熟悉的实时操作系统
- go语言选择语句 switch case
- Stereo Matching文献笔记之(八):《On Building an Accurate Stereo Matching System on Graphics Hardware》读后感~