C#按一个button之后"退出"如何写?

chenghttt 2010-12-12 04:14:48
谢谢
...全文
482 28 打赏 收藏 转发到动态 举报
写回复
用AI写文章
28 条回复
切换为时间正序
请发表友善的回复…
发表回复
icefire06 2010-12-13
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 yangchenhuahua 的回复:]
Application.Exit() this.close()
[/Quote]

正解
lvqiuchen1006 2010-12-13
  • 打赏
  • 举报
回复
Application.Exit();
Ryan20082009 2010-12-13
  • 打赏
  • 举报
回复
Application.Exit();
andy110008 2010-12-13
  • 打赏
  • 举报
回复
Application.Exit();
学习了。
hitlcyu19 2010-12-13
  • 打赏
  • 举报
回复
直接退出吗?
[Quote=引用 1 楼 chengfellow 的回复:]

Application.Exit();
[/Quote]
really_comeMoney 2010-12-13
  • 打赏
  • 举报
回复
也太简单了吧
苍穹无痕 2010-12-13
  • 打赏
  • 举报
回复
你的是CS还是BS构架?如果是CS,则按下面处理:

//关闭当前窗体
this.close();
//应用程序关闭用
Application.Exit()

如果是BS,则按下面处理:

Response.Write( " <script> window.close(); </script> ");

或者写在button 的onclick事件里 click="window.close()"
int64 2010-12-13
  • 打赏
  • 举报
回复
xiaoqiu1234 2010-12-13
  • 打赏
  • 举报
回复
Application.Exit();
piaoqi 2010-12-13
  • 打赏
  • 举报
回复
关闭当前窗体 this.close();
HaveOneDream 2010-12-13
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 haisheng707 的回复:]
Application.Exit() this.close() this.dispose()
[/Quote]
+1
轮销桂魄@ 2010-12-13
  • 打赏
  • 举报
回复
Application.Exit() this.close() this.dispose()
chenghttt 2010-12-13
  • 打赏
  • 举报
回复
[Quote=引用 21 楼 ayouxinping 的回复:]
你的是CS还是BS构架?如果是CS,则按下面处理:

C# code

//关闭当前窗体
this.close();
//应用程序关闭用
Application.Exit()


如果是BS,则按下面处理:

C# code

Response.Write( " <script> window.close(); </script> ");


或者写在button……
[/Quote] 谢谢
彼岸繁华地 2010-12-13
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 yangchenhuahua 的回复:]
Application.Exit() this.close()
[/Quote]
正解
junzi111111 2010-12-12
  • 打赏
  • 举报
回复
Exit()方法
Strive20101101 2010-12-12
  • 打赏
  • 举报
回复
如果是在主窗口退出程序用:Application.Exit();
子窗口关闭当前窗口可用:this.Close();
yangchenhuahua 2010-12-12
  • 打赏
  • 举报
回复
Application.Exit() this.close()
wwfgu00ing 2010-12-12
  • 打赏
  • 举报
回复
onClientClick window.close()
tianjin446260693 2010-12-12
  • 打赏
  • 举报
回复
button事件里写this.close();就OK了
donglin0316 2010-12-12
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 mzloon 的回复:]

应用程序关闭用Application.Exit() 关闭当前窗体 this.close();
[/Quote]
自己选择吧
加载更多回复(7)

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧