You cannot do what you want. Windows are opened in a hierarchy, not a chain.
The first form shown is the top of the window tree. Closing it closes your entire application.
The parent window can HIDE itself. It cannot close itself if there are child windows.
GrandParent Window
|
|
Parent Window
|
|
Child Window
If you want the new child window to replace the parent. The parent window must not create the child window. The GRANDPARENT window should create the new window to replace the parent window.
GrandParent Window
|
----------+------------------
| |
Parent Window New Parent Window
Oh! And any form you show with ShowDialog() MUST have Dispose() called on it before its reference goes out of scope.
Dim x As New Form2
result = x.ShowDialog()
x.Dispose()