1) I think you need to change the order you perform the opertaions to make it more logical.
2) Also look at using the TopMost property which will adjust the zOrder of the windows.
3) Use the hide property first, perform the other options and then close the form, best to keep the close till last.
See the code below as example of what you are trying to do above;
Public Class FormMain
Private Sub ButtonShowTest_Click(sender As System.Object, e As System.EventArgs) Handles ButtonShowTest.Click
Me.Enabled = False
FormTest.Show()
FormTest.TopMost = True
End Sub
End Class
Public Class FormTest
Private Sub ButtonShowPay_Click(sender As System.Object, e As System.EventArgs) Handles ButtonShowPay.Click
Me.Enabled = False
FormPay.Show()
FormPay.TopMost = True
End Sub
Private Sub ButtonClose_Click(sender As System.Object, e As System.EventArgs) Handles ButtonClose.Click
Me.Hide()
FormMain.Enabled = True
Me.Close()
End Sub
End Class
Public Class FormPay
Private Sub ButtonClose_Click(sender As System.Object, e As System.EventArgs) Handles ButtonClose.Click
Me.Hide()
FormTest.Enabled = True
Me.Close()
End Sub
End Class