rakete
rakete

Reputation: 3051

Main form minimized when modal dialog calls Me.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.

Upvotes: 0

Views: 661

Answers (2)

rakete
rakete

Reputation: 3051

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

Sorry..

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 942267

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.

Upvotes: 1

Related Questions