Every window you add is a class and can be addressed just like any other class.
Add a window to your project named MainWindow.
Add a property to MainWindow called count as integer
Add a property to a class, ParentWindow as Window
Set ParentWindow = MainWindow // legal, because MainWindow is a subclass of Window
Try to access ParentWindow.count // fails, Window has no such property
You can access it by casting MainWindow(ParentWindow).count
Change ParentWindow as MainWindow
Try to access ParentWindow.count // success, because it is defined as MainWindow and MainWindow has a count property.
Bottom line, when you add a window to the project, you’re defining a class as well,
I would have thought that a class interface at least would have to exist in the project or the definition of the class.
Inst1 as new Window
Inst2 as new Inst1
var Inst1 as new Window
var Inst2 as Window = Inst1
// Inst2 and Inst1 both refer to the SAME window, they act like pointers in some ways.
var Inst1 as new Window
var Inst2 as new Window
// Inst2 and Inst1 both refer to DIFFERENT windows
If you add a public property to Window , called ParentWindow
Then you could
var Inst1 as new Window
var Inst2 as new Window
Inst2.parentwindow = Inst1
// Now, Inst2 can access any public property of Inst1, using the ParentWindow variable.