Suggestion for Window(0).show not showing

I have a MainWindow that I often hide, and it usually shows back up when I call it.

It seems if I have a few more than 1 window on top of another, then close this series of windows, and then call Window(0).show then nothing happens.

I have included a window menu and I can get it back if I click on the menuitem, then it reappears.

I have also tried Window(0).visible = true to no avail.

Of course, when I go into via the debugger the window nothing happens.

Suggestions?

if you need a window only once i use
WindowName.Show

WindowName.Hide its still there

WindowName.Close it get removed

Window(0) refers to the topmost window at any given moment, not necessarily the first window.

It is the only window existing. I’m trying to find out if there is something I did.
I like Markus idea, and I could write a little routine, but if I did something…

You can find a window like this

For i As Integer = App.WindowCount DownTo 0 If Window(i) IsA WindowCompany Then Window(i).Close If Window(i) IsA WindowStaff Then Window(i).Close If Window(i) IsA WindowDepartment Then Window(i).Close Next

Calling the window by name does cause it to show.

My confusion is after the Window(0).Show, that window is, per the debugger, visible but not showing, and my was top window closes.

there are two possibilities to open a window
WindowName.Show as single instance
or as many you need
var w as new WindowName
w.Show