Application.Exit语句被忽略 [英] Application.Exit Statement Ignored
问题描述
我不怀疑我做了一些愚蠢的事情,但结果是没有调用Application.Exit或者没有工作。
I don't doubt that I did something stupid, but the result is that an Application.Exit is either not being called or not working.
在声明8中,我检查fmNotices.Agreement及其值是假的。 所以我"步骤"并以Application.Exit语句结束。 但接下来的步骤将带我去发表声明12. 也许If-Else结构会更好,但肯定是
我编码的方式应该有效。 我对Application.Exit问题的研究表明,有时Application.End更好但是根据IDE Application.End不存在。 也许它曾经用过。 我从来没用过它。 但我过去使用了
使用了Application.Exit。 它过去一直对我有用。 我将不胜感激。
At statement 8 I inspect fmNotices.Agreement and its value is false. So I "step" and end up on the Application.Exit statement. But then the next step takes me to statement 12. Perhaps an If-Else construct would be better but surely the way I have coded it should work. My research into Application.Exit problems suggests that sometimes Application.End is better but according to the IDE Application.End does not exist. Maybe it used to. I never used it. But I have used Application.Exit in the past. It has always worked for me in the past. I will appreciate any assistance.
Bob
推荐答案
Application.Exit不会立即关闭进程。它将消息发布到消息队列中,并且当消息离开队列并处理时,应用程序将在稍后关闭。
Application.Exit does not shutdown the process immediately. It posts a message into the message queue and the application will shutdown sometime later when the message gets out of the queue and is processed.
ShowDialog启动新消息泵并阻止处理当前的消息。如果你真的想尽快退出,你应该避免这种情况。
ShowDialog starts a new message pump and blocks processing of the current message. If you really want to exit as quick as possible you should avoid that.
这篇关于Application.Exit语句被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!