游戏开始显示Thec application.exit must exit 什么情况

Application.ApplicationExit Event (System.Windows.Forms)
ApplicationExit Event
Expand the table of content
Application.ApplicationExit Event
.NET Framework (current version)
Note The .NET API Reference documentation has a new home. Visit the
on docs.microsoft.com to see the new experience.Occurs when the application is about to shut down.Namespace:
System.Windows.Forms (in System.Windows.Forms.dll)
public static event EventHandler ApplicationExit
You must attach the event handlers to the
event to perform unhandled, required tasks before the application stops running. You can close files opened by this application, or dispose of objects that garbage collection did not reclaim.Because this is a static event, you must detach any event handlers attached to this event in the ApplicationExit event handler itself. If you do not detach these handlers, they will remain attached to the event and continue to consume memory.The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates using the ApplicationExit event to know when the form positions should be persisted to the file, and when the FileStream should be closed.The class MyApplicationContext inherits from
and keeps track of when each form is closed, and exits the current thread when they both are. The class remembers the position of each form when it is closed. When the ApplicationExit event occurs, the class writes the positions of each for the user to the file. The form position data is stored in a file titled appdata.txt that is created in the location determined by . The Main method calls Application.Run(context) to start the application given the .This code is an excerpt from the example shown in the
class overview. See
for the whole code listing.
private MyApplicationContext() {
formCount = 0;
// Handle the ApplicationExit event to know when the application is exiting.
Application.ApplicationExit += new EventHandler(this.OnApplicationExit);
// Create a file that the application will store user specific data in.
userData = new FileStream(Application.UserAppDataPath + "\\appdata.txt", FileMode.OpenOrCreate);
} catch(IOException e) {
// Inform the user that an error occurred.
MessageBox.Show("An error occurred while attempting to show the application." +
"The error is:" + e.ToString());
// Exit the current thread instead of showing the windows.
ExitThread();
// Create both application forms and handle the Closed event
// to know when both forms are closed.
form1 = new AppForm1();
form1.Closed += new EventHandler(OnFormClosed);
form1.Closing += new CancelEventHandler(OnFormClosing);
formCount++;
form2 = new AppForm2();
form2.Closed += new EventHandler(OnFormClosed);
form2.Closing += new CancelEventHandler(OnFormClosing);
formCount++;
// Get the form positions based upon the user specific data.
if (ReadFormDataFromFile()) {
// If the data was read from the file, set the form
// positions manually.
form1.StartPosition = FormStartPosition.M
form2.StartPosition = FormStartPosition.M
form1.Bounds = form1P
form2.Bounds = form2P
// Show both forms.
form1.Show();
form2.Show();
private void OnApplicationExit(object sender, EventArgs e) {
// When the application is exiting, write the application data to the
// user file and close it.
WriteFormDataToFile();
// Ignore any errors that might occur while closing the file handle.
userData.Close();
} catch {}
.NET FrameworkAvailable since 1.1
IN THIS ARTICLE
Is this page helpful?
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.|  
|  
|  
|  
|  
只需一步,快速开始
查看: 4141|回复: 0
the application must exit immediately出现这强退出是什么问题~!
主题帖子积分
中级玩家, 积分 242, 距离下一级还需 8 积分
中级玩家, 积分 242, 距离下一级还需 8 积分
the application must exit immediately
出现这句后要强退出~!求大神帮解决
Powered byexit application是什么意思_百度知道
exit application是什么意思
我有更好的答案
exit application意思是:退出应用程序以下双语例句:1.&Set capture file, save files or exit application& 设置捕获文件,保存文件或退出应用程序2.In practice, the most obvious repercussion of this difference is that on mac os x, closing the last window ofan application does not exit the application itself. 实际上,这种差别最明显的表现在于,在mac os x中,关闭某应用程序的最后一个窗口并不会让该程序退出。3.Most applications for the installation and run-time temporary files are generated in the normal exit, thegeneral application of the temporary files can be deleted, if the non-normal exit, thetemporary files will be left in the disk. 大多数应用程序在安装和运行时都生成临时文件,在正常退出后,一般的应用程序能删除临时文件,但有的则不能;若是非正常退出,则临时文件会残留在磁盘上。4.Article 20 the owner, or his or her agent, of exit animals and plants, their products or other quarantineobjects shall, before their exit, submit an application for quarantine inspection to the port animal and plantquarantine office. 第二十条货主或者其代理人在动植物、动植物产品和其他检疫物出境前,向口岸动植物检疫机关报检。5.The owners or their agent should fill in application form for approval according to the classifications of entryand exit special goods, one form for one classification. 货主或者其代理人应当根据出入境特殊物品的分类填写《审批申请单》,每一类别填写一份。
采纳率:95%
来自团队:
就是你电脑当前的应用程序,类似QQ之类的软件。退出。
exit application退出应用望采纳哦,O(∩_∩)O谢谢
为您推荐:
其他类似问题
application的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。24小时热门版块排行榜&&&&
【悬赏金币】回答本帖问题,作者将赠送您 50 个金币
(小有名气)
在线: 319.5小时
虫号: 842152
注册: 专业: 理论和计算化学
计算能带出现“APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)”
我在计算一200个原子的体系时出现如下错误:
running on& &64 nodes
distr:&&one band on& &16 nodes,& & 4 groups
vasp.5.2.12 11Nov11 complex& && && && && && && && && && && && && && && && && &
POSCAR found type information on POSCAR&&Zn S&&Cd Cu
POSCAR found :&&4 types and& &&&200 ions
scaLAPACK will be used
-----------------------------------------------------------------------------
|& && && && && && && && && && && && && && && && && && && && && && && && && &&&|
|& && && &&&W& & W& & AA& & RRRRR& &N& & N&&II&&N& & N& &GGGG& &!!!& && && &&&|
|& && && &&&W& & W& &A&&A& &R& & R&&NN& &N&&II&&NN& &N&&G& & G&&!!!& && && &&&|
|& && && &&&W& & W&&A& & A&&R& & R&&N N&&N&&II&&N N&&N&&G& && & !!!& && && &&&|
|& && && &&&W WW W&&AAAAAA&&RRRRR& &N&&N N&&II&&N&&N N&&G&&GGG& &!& && && && &|
|& && && &&&WW&&WW&&A& & A&&R& &R& &N& &NN&&II&&N& &NN&&G& & G& && && && && & |
|& && && &&&W& & W&&A& & A&&R& & R&&N& & N&&II&&N& & N& &GGGG& &!!!& && && &&&|
|& && && && && && && && && && && && && && && && && && && && && && && && && &&&|
|& && &For LVTOT=.TRUE. VASP.5.x writes the TOTAL local potential to& && && & |
|& && &the file LOCPOT. If you want the Hartree contributions only, use& && & |
|& && &LVHAR=.TRUE. instead.& && && && && && && && && && && && && && && && &&&|
|& && && && && && && && && && && && && && && && && && && && && && && && && &&&|
-----------------------------------------------------------------------------
LDA part: xc-table for Pade appr. of Perdew
WARNING: stress and forces are not correct
POSCAR, INCAR and KPOINTS ok, starting setup
WARNING: small aliasing (wrap around) errors must be expected
FFT: planning ...(& && && &&&1 )
WAVECAR not read
charge-density read from file: DSCS-1& && && && && && && && && &
magnetization density read from file 1
entering main loop
& && & N& && & E& && && && && && && &dE& && && && & d eps& && & ncg& &&&rms& && && & rms(c)
RMM:& &1& &&&0.E+04& & 0.91131E+04& &-0.600& &0.121E+03
RMM:& &2& &&&0.E+04& &-0.65588E+04& &-0.100& &0.286E+02
RMM:& &3& &&&0.E+01& &-0.25447E+04& &-0.300& &0.127E+02
RMM:& &4& & -0.E+03& &-0.49572E+03& &-0.500& &0.661E+01
RMM:& &5& & -0.E+03& &-0.12611E+03& &-0.100& &0.303E+01
RMM:& &6& & -0.E+03& &-0.47761E+02& &-0.400& &0.173E+01
RMM:& &7& & -0.E+03& &-0.59595E+01& &-0.739& &0.500E+00
RMM:& &8& & -0.E+03& & 0.56589E+00& &-0.275& &0.135E+00
RMM:& &9& & -0.E+03& &-0.16184E-01& &-0.443& &0.331E-01
RMM:&&10& & -0.E+03& & 0.37312E-02& &-0.175& &0.845E-02
RMM:&&11& & -0.E+03& &-0.17064E-03& &-0.372& &0.205E-02
RMM:&&12& & -0.E+03& & 0.33987E-04& &-0.129& &0.976E-03
APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)
请各位帮我看看问题是出在哪里。谢谢。
incar文件如下:
PREC& && &= Medium& &
ISTART& & = 1& && &&&
ICHARG& & = 11& && &
ISPIN& &&&= 2& && && &
ENCUT& &&&= 400.0& &
ISMEAR& & = 1& && &&&
SIGMA& &&&= 0.2& &&&
NELM& && &= 500& &
NELMIN& & = 5& && &&&
NELMDL& & = -8& &&&
EDIFF& &&&= 1E-4& &&&
IALGO& &&&= 48& && &
LDIAG& &&&= T& && && &
LREAL& &&&= Auto& &&&
VOSKOWN = 1& && && &
LWAVE& &&&= F& && && &
LCHARG& & = T& && && &
LVTOT& &&&= T& && &&&
LORBIT& & = 10
ISIF& && &= 3& && && && && &
ISYM& && &= 0& && &&&
EDIFFG& & = -0.02& && && && &
NSW& && & = 0& && &
IBRION& & = -1
& 猜你喜欢
已经有20人回复
已经有9人回复
已经有25人回复
已经有7人回复
已经有59人回复
已经有3人回复
已经有3人回复
已经有175人回复
已经有19人回复
已经有24人回复
& 本主题相关价值贴推荐,对您同样有帮助:
已经有7人回复
已经有10人回复
已经有21人回复
已经有16人回复
已经有10人回复
已经有18人回复
已经有7人回复
已经有9人回复
已经有7人回复
已经有7人回复
已经有12人回复
(初入文坛)
在线: 3.4小时
虫号: 4998412
楼主怎么处理这个问题的啊&&我也遇到这个问题了
(小有名气)
在线: 208.6小时
虫号: 1136664
和ISIF有关么?你这为什么是3?另外看下warning,你到底应该用哪个?最新说明书上好像又讲
(小有名气)
在线: 208.6小时
虫号: 1136664
引用回帖:: Originally posted by cigarette at
和ISIF有关么?你这为什么是3?另外看下warning,你到底应该用哪个?最新说明书上好像又讲 优化的时候ISIF也是3?
相关版块跳转
第一性原理
我要订阅楼主
的主题更新
小木虫,学术科研互动社区,为中国学术科研免费提供动力
违规贴举报删除请发送邮件至:
广告投放与宣传请联系 李想 QQ:
QQ:&&邮箱:
Copyright &
MuChong.com, All Rights Reserved. 小木虫 版权所有开机总是出现failed to initalize smartaudio the application will now exit 怎么办_百度知道
开机总是出现failed to initalize smartaudio the application will now exit 怎么办
我有更好的答案求助知道网友
应该是smartaudio这个程序有问题,建议你卸载,或者再次官网下载安装这个程序
这个应该是smartaudio这个程序有问题,建议你卸载,或者再次官网下载安装这个程序
本回答被网友采纳
1条折叠回答
为您推荐:
其他类似问题
smartaudio的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 wpf application.exit 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信