C # Refer to a control or object defined in another form

0

In a C # project I have two forms defined. From one of them I want to refer to an object defined in the other form, how do I do it? In VB 6.0, the name of the other form was placed followed by a period and then the name of the object, in C # I could not do it. Thanks in advance to whoever answers me

    
asked by Abimarper 19.09.2016 в 19:08
source

1 answer

3

I understand that by object you mean a control of the form.

The truth is that I do not recommend in .net to apply this technique because it generates a link between the forms

Access to the control of the form is done locally where you define it, from the other way it performs actions invoking methods that it exposes by means of an interface.

You would apply the technique that I mention here in this article

Communicate Forms

The same topic was also raised in this other forum question that could help you

answered by 19.09.2016 в 19:23