广告载入中
  所在位置:网站首页 -> 网络学院 -> .NET -> .NET Framework -> 开关程式使程式最小化代码
我要发言 发起投票 发起交易 任务悬赏 回复话题              

开关程式使程式最小化代码

时间:2007-12-3 20:51:03 作者: 能量守恒 短消息 收藏 编辑 删除
广告载入中
广告载入中
广告载入中
private void 顯示程序ToolStripMenuItem_Click(object sender, EventArgs e)
...{
if (顯示程序ToolStripMenuItem.Checked==false)
...{
this.Show();
this.WindowState = System.Windows.Forms.FormWindowState.Normal;
this.ShowInTaskbar = true;
bclose = false;
顯示程序ToolStripMenuItem.Checked = true;
}
else
...{
this.Hide();
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
bclose = true;
顯示程序ToolStripMenuItem.Checked = false;
}
}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
...{
if (!bclose)
...{
this.Hide();


this.WindowState = System.Windows.Forms.FormWindowState.Minimized;


e.Cancel = true;
bclose = true;
顯示程序ToolStripMenuItem.Checked = false;
}
} private void 退出程序ToolStripMenuItem_Click(object sender, EventArgs e)
...{
bclose = true;
Application.Exit();
}

广告载入中

看看评论

快速回复

  • 支持UBB,HTML标签


  • 高级回复
  • 广告载入中
      
    操作选项: 加精 解精 奖惩 设专题 设公告 解公告 固顶 总固顶 解固顶 结帖 解结帖 锁帖 解锁 移帖 删帖   
    看看456-学习娱乐在线门户.致力为一切由互联网接入本站的朋友们,倾情打造一片学习娱乐新时空!
    Copyright ? 2007-2009 www.kankan456.com online services. All rights reserved. 浙ICP备07003587号
    欢迎您在看看发布各类原创作品和讨论话题,您的支持是“看看456”前进的基石