I know how to do this with a separate window, but trying it with a ContainerControl puzzles me:
I need to set up a lot of parameters which are window specific. To do this I create a window winSettings and pass the calling window mainWindow as parameter:
dim w as new winSettings( self )
w.showModalWithin( self )
I’m trying something similar with a ContainerControl (mainly to be able to control how the settings dialog appears, e.g. sliding in from the side etc).
I add a property ParentWindow as mainWindow. I add a Constructor to the ContainerControl with
ParentWindow = mainWindow( self.TrueWindow )
I tried several variations but I always get an error (usually Nil exception, but also stack overflow depending on the variation)
Why does ParentWindow = mainWindow( self.TrueWindow ) give me a Nil Object Exception?
Does the enclosing window not exist yet when the ContainerControl is constructed?