I know how to make a form at runtime and to add the controls to it and connect them to handlers… What I want to know is how to make the controls inside this form to react with their container form, for example to close it?
To make it more clear, when I want to close the startup-form by a button on it, I just add this code in the required handler:
Me.Close()
Then, what should I write instead of “Me” to close the runtime-created form?!
Thanks in advance.
Instead of Me, you use the variable that references the runtime-created form.
For instance: