c# - 程序未正确关闭 c# 和表单问题
问题描述
然后我关闭程序它没有完全关闭并且它仍然在后台活动我如何修复它?
再加上转换形式,例如:
this.Hide();
Form2 main = new Form2();
main.Show();
然后返回它再次显示检查更新消息框
WebClient webClient = new WebClient();
if (!webClient.DownloadString("https://pastebin.com/raw/n77ayreS").Contains("1.6"))
{
if (MessageBox.Show("Looks like there is an available update, would you like to download it?", "Check For Updates", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
System.Diagnostics.Process.Start("https://github.com/TomerGamerTV/Unreal-Cracking-Pack/releases");
}
else
{
}
}
else
{
MessageBox.Show("You are on the latest version!", "Check For Updates");
}
这是我第一次在这里问如果我做错了什么对不起
解决方案
Environment.Exit(0)
已修复程序 thx Paul Sütterlin
推荐阅读
- c++ - 为什么一个小部件的 QFont 和 QFontInfo 系列属性不同
- python - discord.py 中的异步 lambda 函数
- java - Spring-Boot:有没有办法通过aop添加Cookies
- groovy - Groovy 版本的生命周期结束/支持?
- python - 读取文件时在python中实现生成器/迭代器
- jmeter - 如何从 JMeter 中的响应中准备 JSON 有效负载
- openid-connect - OIDC 是否明确处理多个设备的刷新令牌交换?
- bash - 是否有一个 bash 命令可以在终端窗格已经打开的情况下打开 VS Code?
- lambda - 从方法传递 lambda 表达式......代码有什么问题?
- swift - 如何在 Podcasts 应用程序中模仿自定义 NavigationBar 项目