Referring to the window by its name will cause it to open. Either do not refer to it by name after you have closed it, or turn off Implicit Instance and keep your own instance around to use.
When Implicit Instance is off, calling a window method when the window is closed opens it again. To avoid this I found the only way is as the following example, beause if not Hide it shows it, and if not closed it opens a new instance for every call.
Am I missing somethig (other that putting the method in a module)
Sub Action() Handles Action
var w as new window2
w.Hide
w.doSomething
w.close
End Sub
The floating window offers some facilities (objects) that may be placed on the main window, those objects once in the main window may be repositioned and this use methods of the window. Even if these objects should be placed and repositioned with the floating window opened, the user may close it, and continue reposition these objects, and this opens again the floating window.
I see the best approach would be moving some of these window methods to a module.
or try and set visible of your window to false in designer and at other places you have to show it.
preferably encapsulate your business logic into classes.