Hello all,
How can I programatically find out if a window has been instantiated? With implicit checked, code such as If Window1.Visible = True then xxx the window will be instantiated through that code.
What other ways are there to find out if a window exists?
You can’t really. You’d need to turn off ImplicitInstance, then you can track it yourself. Code such as “Window1.Visible = True” will no longer function though, you’ll need to reference a property used to store your window object, and create the window when you need it.
if (WindowCount > 0) then
for i as integer = 0 to (WindowCount - 1)
if (Window(i) IsA Window1) then
// do whatever you need to do here
exit for i
end if
next
end if
if (WindowCount > 0) then
for i as integer = 0 to (WindowCount - 1)
if (Window(i) IsA Window1) then
// do whatever you need to do here
exit for i
end if
next
end if[/quote]
I was literally writing this same code when yours popped up