|
Re: Accesing Control Properties on Another Form
Quote:
|
Originally Posted by Alias
How would it be best to declare, reference and use new variables for this task when it could be done with a simple cast?
|
I was suggesting that for encapsulation. Having the child form muck with the parent form's controls abrogates the parent form's responsibility to take care of its own controls. Having a mechanism (property or otherwise) as part of the child form's interface that allows the parent form to determine its state and act appropriately seems a better solution to me.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
|