求助:关闭主窗体后进程未终止(仅部分电脑出现)
Issue: OpenFileDialog Application Persists in Background After Closing (Release Mode Only)
Hey folks, here's a clear breakdown of the bug I've been digging into:
- This issue has cropped up on 2 internal company machines and 1 client machine, and so far I haven't been able to pin down a consistent trigger pattern.
- I've successfully reproduced the error with a super stripped-down test program that only interacts with an
OpenFileDialog—no extra logic or dependencies involved. - Critical detail: This only occurs when running the compiled executable (not when debugging in IDE mode). After closing the form, the process stays active in the background indefinitely.
Minimal Reproducible Code
Public Class Form1 Private ofdAbrir As New OpenFileDialog() Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' Launch the file picker dialog ofdAbrir.ShowDialog() ' Try to close the form right after dialog interaction Me.Close() End Sub End Class
Additional resources to reproduce the bug:
- A complete project package containing this test code
- A demo video that shows the bug in action (specifically highlighting the process lingering in Task Manager after the form is closed)
内容的提问来源于stack exchange,提问作者Moises Junior
相关产品推荐
相关产品推荐

