I'm not sure I fully understand your problem, but have you tried:
ThisForm.MyAddedProperty = new_value
"This" refers to the actual object attached to the method invoked. So if you are in the Click() method of MyButton1, then "This" refers to MyButton1.
If you happen to be in a Form-related method (like Refresh() for example), then "This" will refer to the form.
"ThisForm" is a 'short-hand' way to refer to the Form that contains the object whose method you are now in. Assuming that your Form has a Name Property of MyForm1 then you could use "MyForm1.MyAddedProperty = new_value" instead. But you can guess that this is not very helpful in the long run because that line is now forever tied to the SPECIFIC name MyForm1. By using ThisForm the code can handle ANY form that it is executing against.
Good luck,
JimN
>How can I change property (my added) of class from form of that class from some method?
>I have tried with command THIS but I didn't work (also I need explain of that command).
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement