G
Guest
Is this a proper technique or just a newbie hack? I was looking for alternatives to globals
I have a project with a main form
I add a form X.
I add a property Y and a button to X.
I call X.ShowDialog() from the main form
In form X, I press the button which sets the value of the property Y and then calls Me.Hide()
I then retrieve the value of the property Y from X and then call X.Dispose in the main form
(I came up with this myself. I was not aware that Hide could return control to the calling form and I haven't found anything explicitly relating to this in the documentation yet.
I have a project with a main form
I add a form X.
I add a property Y and a button to X.
I call X.ShowDialog() from the main form
In form X, I press the button which sets the value of the property Y and then calls Me.Hide()
I then retrieve the value of the property Y from X and then call X.Dispose in the main form
(I came up with this myself. I was not aware that Hide could return control to the calling form and I haven't found anything explicitly relating to this in the documentation yet.