gpt4 book ai didi

VB.NET 应用程序没有完全关闭

转载 作者:行者123 更新时间:2023-12-05 08:24:33 24 4
gpt4 key购买 nike

当我启动我的应用程序并按下应用程序上的“X”按钮,或部署的退出按钮时: me.close 它不会完全关闭应用程序。就像该实例仍在 Visual Studio 中运行一样,或者如果您转到任务管理器进程,您仍然可以在那里看到它。我怎样才能让它完全关闭?

最佳答案

如果您确实有线程在应用程序中运行,请将 IsBackground 属性设置为 True

Thread.IsBackground Property在 MSDN 上

Remarks

A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the common language runtime ends the process. Any remaining background threads are stopped and do not complete.

关于VB.NET 应用程序没有完全关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1759928/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com