03-17-2013, 12:44 AM
Because as I said, it exists.
If there is a CheckBox on Form1. You instantiate and show a new form (Form2), when you instantiate a new instance of Form1 from a method embedded in the Form2 class, it's no different than how you have Form1 set up in the designer. It's a clone of that blueprint of Form1...
Sorry, I was just going by what you're saying, but *Form1 (or Form2 as in your post)... It doesn't matter, if there is a CheckBox on that form, if you instantiate the form that has a CheckBox in it, it exists. That's all there is to it, doesn't matter if the form is hidden, not shown. The only time it wouldn't exist is if the control was removed from that form as it's parent container, or if the form itself doesn't exist at that point in time, because if it doesn't exist, any of the control children will not exist either.
The issue is this:
If you declare a new instance of Form1, how is this new instance, supposed to reference the original?
If there is a CheckBox on Form1. You instantiate and show a new form (Form2), when you instantiate a new instance of Form1 from a method embedded in the Form2 class, it's no different than how you have Form1 set up in the designer. It's a clone of that blueprint of Form1...
Sorry, I was just going by what you're saying, but *Form1 (or Form2 as in your post)... It doesn't matter, if there is a CheckBox on that form, if you instantiate the form that has a CheckBox in it, it exists. That's all there is to it, doesn't matter if the form is hidden, not shown. The only time it wouldn't exist is if the control was removed from that form as it's parent container, or if the form itself doesn't exist at that point in time, because if it doesn't exist, any of the control children will not exist either.
The issue is this:
Hidden Content
If you declare a new instance of Form1, how is this new instance, supposed to reference the original?