implicit instance off

I have several windows in my project. Call them W1, W2 etc. I switch from Wi to Wi+1 by Wi.visible = false and Wi+1.visible = true (thus having the event executed). I als tried to add extra methods like Wi.close and Wi.hide. The problem I have is that Wi (but especially W1) might just re-appear and hide the Wi+1 that I just made visible. I understand from a previous exchange on this forum that this peculiar behavior can occur if W1 has implicitinstance ON. Though it is said that to display this behavior it needs a call like W1.close somewhere and I have radically removed any operations with W1 once I have made it invisible.
But stil this W1 will re-appear (the Mac version doesn’t act like this anymore but the windows version still does). So I decided to switch implicitinstance to OFF. I did change the window name from W1 to W1c and added a global dim W1 as W1c. Then I added in the
W1 = New W1c
This results an error (NilObjectException) when I try to set the title attribute of W1. To make long story short: I think I don’t really understand what I am doing and until the implicitinstance-OFF use is solved I can’t check if this annoying W1 appearing can be solved indeed by doing this. Please help me.

Implicit Instance means the window is always there, always around. Any time you access it or anything on it it will become visible. Turning it off means you will manage instances of the windows yourself. You use them like any other class.

Where do you try to set the title of W1?

This below should work just fine:

dim winInstance as new winSuper
winInstance.Title = "Window Management"

the title is set in the open event of the (in instantiated window.

More specifically, where in relation to setting up your new instance of the window do you attempt it?
It’s probably related to the very specific way you’re attempting to manage windows by number.

A larger view of your code may have some insight.

If you need to iterate open windows, use the global Windows array.

for i as integer = 0 to WindowCount-1 if window(i) isa MyWindow then myWindow(window(i)).somevariable = blah end next

Then cast the Window to your window and set the property or call the method or whatever. If you need to see if it’s already open or not you can do something like this.

[code]for i as integer = 0 to WindowCount-1
if window(i) isa MyWindow then

//Window not already open
dim w as new MyWindow