Quote Originally Posted by jmsrickland View Post
What do you mean you tried to compile exe?
I suggested that as I wasn't sure exactly what the OP was questioning about. We all know that what happens in IDE is not necessarily the same thing that happens when compiled. In this case, appears so

Quote Originally Posted by jmsrickland
When you again click on Form1, Form2 will again appear because it is the child of Form1.
Not exactly. Form2 is not a child of Form1. It is owned by a hidden VB window, same as Form1 is owned by that hidden window. When one clicks on an owned form, it will bring it's owner up in the Zorder too. Since owned windows cannot be lower in the Zorder than the owner, all the owned windows come up too. This is what appears to be happening.

If vietnamvodich wants these windows to be independent of each other, then they should be part of different applications. That may also be accomplished by making Form2 an owned window of the desktop via APIs. Maybe this example?