Window frame is a document, setting to other types does nothing.
Seems like a bug to me.
[code]dim w as new window2()
MsgBox “here”
[/code]
The window shows on MsgBox “here”
What if i want to show it within a certain window etc. I could not get to that code.
Also even if i never call show, with visible set to false it is still registered as an open Window in WindowCount.
I have to call close on the window to remove it.
[quote=470981:@Graham Busch]Window frame is a document, setting to other types does nothing.
Seems like a bug to me.
[code]dim w as new window2()
MsgBox “here”
[/code]
The window shows on MsgBox “here”
What if i want to show it within a certain window etc. I could not get to that code.
Also even if i never call show, with visible set to false it is still registered as an open Window in WindowCount.
I have to call close on the window to remove it.[/quote]
The window should NOT be shown* but the Open Event should fire as that has to do with constructing the window. E.g. set the properties in the open event. If the default IDE setting is visible or the Open even has Self.Visible = True then it could possibly show.
unless you specify to do so in the Window.Open event
Sounds like a bug, i think you should make sure the Open event doesn’t have visibility code in it.
Ah… IMPLICIT INSTANCE means that it is implied that a “NEW WINDOW” command is automatically executed, this normally causes the window in question to appear.
You did NOT have Implicit Instance, However, you did say “NEW WINDOW2”… which is an EXPLICIT INSTANCE, and therefore causes the window to appear
[quote=470997:@Dave S]Ah… IMPLICIT INSTANCE means that it is implied that a “NEW WINDOW” command is automatically executed, this normally causes the window in question to appear.
You did NOT have Implicit Instance, However, you did say “NEW WINDOW2”… which is an EXPLICIT INSTANCE, and therefore causes the window to appear[/quote]
It should not not if the Visible property in the IDE is set to false
basically that lets you create an instance, manipulate it without showing it
Create a new project
Add a new window (called window2)
Turn off implicit instance for window2
Add a button on window1 and add action event handler and add this code
[code]dim w as new window2()
MsgBox “here”
w.Show()[/code]
run it and notice window2 appears when msg box appears
Or only call dim w as new window2() in the action event.
So for all non implicit windows i need to turn off visible in the IDE and also ensure i close it if i return before showing it? (otherwise window stays in memory and is listed in WindowCount)
Windows don’t go “out of scope” because the framework holds a reference to them, so the reference count never goes to zero. They are different than “normal” objects in that you’re not the only one who cares about them.