开发者

Main form minimized when modal dialog calls Me.Hide()

开发者 https://www.devze.com 2023-02-18 04:49 出处:网络
sometimes (not everytimes), when I call the Me.Hide() in a form开发者_如何转开发, which I called with .ShowDialog(), the main form, which called this dialog minimized.Very unclear.But, you cannot hide

sometimes (not everytimes), when I call the Me.Hide() in a form开发者_如何转开发, which I called with .ShowDialog(), the main form, which called this dialog minimized.


Very unclear. But, you cannot hide a dialog. ShowDialog() will disable all other windows in your app. When you hide the dialog, there is no window left that can get the focus. The user now won't be able to get back to your app. Winforms protects against this by automatically closing the dialog when you hide it.

You can minimize it.


The answer is to use Me.Close() instead of Me.Hide()

Sorry..

0

精彩评论

暂无评论...
验证码 换一张
取 消