I have a project that contains a login that when entering as an administrator, an MDI window is displayed, which is a configuration window and from there you can open the main window (both are open). In the main window I have a button that closes the session by going back to the login window and (what I want the software to do) closes the MDI and main windows, but only closes the main window and opens the login window. Probe performing an instance of the MDI window in the following way:
Dim panel As New Panel_MDI()
panel.Close()
Me.Close()
but this does not work for me.
I realized that when I made some adjustments, the instances of those forms started to fail. What you do is that, pass an argument from the login to the main screen, creating a New that receives arguments.
Private nombre As String
Public Sub New()
InitializeComponent()
abrir_controlProduccion()
abrir_eTata()
End Sub
Public Sub New(ByVal nom As String)
Me.New()
nombre = nom
End Sub
That code is from the main form, the one from the MDI form is the same.
Can it be that when creating new instances I'm not closing the one I want but another one?