Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2008 Server
>Ok...this whole 'ME' thing that VB has going on is very confusing.
>
>I'm working in a TextBox_TextChanged event handler
>
>I get the whole 'ME' here refers to the TextBox, so, one would think, if I wanted to change the text of a label (lblStudentName) I would refer to it as me.parent.lbl, but it doesn't seem to like that. It wants me.lblStudentName.Text. It seems to kinda act like the royal 'we'.
>
>
>This is very confusing and is there a better way to refer to other controls on the form other than Form.lbl...?
Me refers to the current class. Your eventhandler is probably written as a method of the form so me = the form.
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