Hello, having a bit of a problem with referencing dynamically-created forms in my project.
I have a function that will generate a new form when executed. After said form is created, how then do I access it programmatically to add new controls?
For sanity's sake, let's say that I have created a new form named "MainScreen". In my code how can I then reference this form name to begin adding elements? There doesn't seem to be a Controls() style look-up for forms in the project. I have stumbled across various answers for needing System.Reflection and such, but have been unsuccessful in utilizing them.
My goal is to be able to dynamically create these forms and then later dynamically create or alter their content as needed through user interaction and options. Is there anything like:
MyProject.GetByName("MainScreen") or something blatantly obvious that I am overlooking?
Your comments are greatly appreciated.
I have a function that will generate a new form when executed. After said form is created, how then do I access it programmatically to add new controls?
For sanity's sake, let's say that I have created a new form named "MainScreen". In my code how can I then reference this form name to begin adding elements? There doesn't seem to be a Controls() style look-up for forms in the project. I have stumbled across various answers for needing System.Reflection and such, but have been unsuccessful in utilizing them.
My goal is to be able to dynamically create these forms and then later dynamically create or alter their content as needed through user interaction and options. Is there anything like:
MyProject.GetByName("MainScreen") or something blatantly obvious that I am overlooking?
Your comments are greatly appreciated.