.net - 为什么我不能处理表单?
问题描述
我有一个 Windows 窗体应用程序,它有两种形式:Form1 和 Form2。启动窗体是Form1,Form2是通过Button点击加载的。
在我加载 Form1 之后,但在我加载 Form2 之前,这是我得到的:
MsgBox(Form2 Is Nothing) 'returns true
MsgBox(Form2.IsDisposed) 'returns false
MsgBox(Form2 Is Nothing) 'returns false
Form2.Dispose()
MsgBox(Form2 Is Nothing) 'returns false
MsgBox(Form2.IsDisposed) 'returns false
Form2.Close()
MsgBox(Form2 Is Nothing) 'returns false
MsgBox(Form2.IsDisposed) 'returns false
如果我加载 Form2 然后用关闭框关闭它:
MsgBox(Form2 Is Nothing) 'returns false
MsgBox(Form2.IsDisposed) 'returns false
为什么 Form2 永远不会被处理掉,以及如何完全处理掉它?
解决方案
推荐阅读
- apache - Xampp x64-7.4.3-0-VC15 Apache 意外关闭
- c# - 用于 TestContext.DeploymentDirectory 的 Azure 管道单元测试 Uri 导致失败
- c++ - 如何对 PVOID 进行类型转换以获取 C++ 中任何变量的确切结构或数据类型
- c# - 在 UWP 中更改 DropDownButton 的宽度
- python - python在不同时间以不同方式打印类
- bash - 如何使用expect登录VPN
- class - 如何从 Dart 的 main 函数中更改类的默认属性?
- python - Pandas - 所有唯一列组合的计数,包括 NONE 行
- django - 未找到带有参数“(id)”的“URL”的反向。尝试了 1 种模式:'URL< int:ID >'
- ios - swift iOS 通用领域管理器