M
Manuel Canas
Hi there,
I'm having a hard time figuring out why is this happening. The problem is a
couple of variables are not getting properly initialized when I load a
FormX from it's parent form.
I have the main form (parent) as the startup object for the project. When I
load the FormX from a menu from the main form (parent) and here is where
these two variables are not gettting initialized properly. This is the code
that calls the FormX from the main menu ;
Dim FormX As New frmTest
FormX.MdiParent = Me
'Display the new form.
FormX.Show()
Now the two variables are these;
Private Shared m_FormDefInstance As frmSomeForm
Private Shared m_InitializingDefInstance As Boolean
the first variable m_FormDefInstance Should be =
ApplicationName.frmSomeForm. now, when I load FormX from it's parent, with
the code above, the first variable = nothing!! but when I change the start
up object to the FormX, then they properly initialized.
Now can anybody guide me on the right direction on how to load FormX so the
these variables are set properly at loading time.
I don't know if I'm explaining things properly here, if you need me to be
more specific here, please let me know.
Thanks for your help on this one.
Manny
I'm having a hard time figuring out why is this happening. The problem is a
couple of variables are not getting properly initialized when I load a
FormX from it's parent form.
I have the main form (parent) as the startup object for the project. When I
load the FormX from a menu from the main form (parent) and here is where
these two variables are not gettting initialized properly. This is the code
that calls the FormX from the main menu ;
Dim FormX As New frmTest
FormX.MdiParent = Me
'Display the new form.
FormX.Show()
Now the two variables are these;
Private Shared m_FormDefInstance As frmSomeForm
Private Shared m_InitializingDefInstance As Boolean
the first variable m_FormDefInstance Should be =
ApplicationName.frmSomeForm. now, when I load FormX from it's parent, with
the code above, the first variable = nothing!! but when I change the start
up object to the FormX, then they properly initialized.
Now can anybody guide me on the right direction on how to load FormX so the
these variables are set properly at loading time.
I don't know if I'm explaining things properly here, if you need me to be
more specific here, please let me know.
Thanks for your help on this one.
Manny