I have an application in vb.net that starts with a subfunction, performs some actions and decides whether it shows itself or not. When he shows himself, he does it by calling dialog.ShowDialog().
When it returns dialog.ShowDialog(), the application does some cleanup and shuts down.
I would like to find a way to temporarily hide the dialog (send it to the system tray) without returning from the ShowDialog () function. However, as soon as I do me.Hide()in the form code, the form is effectively hidden, but the ShowDialog () function returns and the process closes.
I understand that this is the expected behavior. So my question is, how can I get this effect? This is the start of a dialog that can be hidden and blocked until the user really wants to exit the application.
source
share