Please review the following code below.

My intent is to check if a menu form is open and minimized. If it is, then once the main form is closed bring the minimized menu form back to the screen from its minimized state. If the Menu form was closed by the user for whatever reason, reopen it. I hope my explanation is clear as it is difficult to explain the process without a small book being written. Please ask any further questions for understanding if needed.

To further clarify:

When executing the program exe file a MENU form opens up on the screen (for simplification purposes I'll refer to this as MENU_A) that allows one to chose to execute 1 of three individual programs.

If one chooses to open the 1st program, MENU_A is minimized, a PARENT container opens which is mainly a sub-menu. By default a CHILD form auto loads into the PARENT container. Once one chooses another menu option at the top of the PARENT container the currently opened CHILD form closes and opens the next chosen CHILD form. This is all working as intended.

My problem is specific to program 1 in that if one activates the PARENT formclosing button (top right 'X') the PARENT container closes (as well as the CHILD) but then goes into an eternal loop and opens the MENU_A form constantly (even if it is already open and minimized) until I 'end program' via the task manager. What am I overlooking please?

The following code is currently residing on the PARENT container form:

Code:
    Private Sub Menu1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
        For count As Integer = My.Application.OpenForms.Count - 1 To 1 Step -1
            My.Application.OpenForms(count).Close()
        Next

        Dim Console As Process = Process.GetProcessesByName("MENUform.exe").FirstOrDefault
        If Console IsNot Nothing Then
            If IsIconic(Console.MainWindowHandle) Then 'check if the window is minimized. If it is not, then you don't want to restore it, you only need to activate it.
                SendMessageW(Console.MainWindowHandle, WM_SYSCOMMAND, SC_RESTORE, 0) 'restore the window from it's minimized state
            Else
                AppActivate(Console.Id) 'activate it to bring it to the front of all other windows
            End If
        Else
            'If Console is not open due to accidental closing, start the program on close.
            If Console Is Nothing AndAlso File.Exists("C:\Program Files (x86)\PETS Data Management System Console\MENUform.exe") Then
                Process.Start("C:\Program Files (x86)\PETS Data Management System Console\MENUform.exe")
            End If
        End If

        Close()
    End Sub