Last active
March 5, 2019 08:31
-
-
Save ebenito/21816c3681d3adf16140629e32d2bd17 to your computer and use it in GitHub Desktop.
Capturar un evento para cualquier objeto de cierto tipo (aquí TextBox)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Each c As Object In Form1.Controls | |
If c.GetType Is GetType(TextBox) Then | |
AddHandler DirectCast(c, TextBox).TextChanged, AddressOf CamposForm_TextChanged | |
End If | |
Next | |
Sub CamposForm_TextChanged(ByVal sender As TextBox, ByVal e As System.EventArgs) | |
CamposCambiados.Value = CamposCambiados.Value & IIf(CamposCambiados.Value <> "", ", " & sender.ID, sender.ID) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment