Allg Eventhandler für Chanage-Ereignise festlegen
[Visual Basic] Private Sub AddChanges( _
ByVal Container As Control _
)
[Visual Basic] Private Sub AddChanges(ByVal Container As Control)
Dim l As New List(Of Control)
Me.GetControl(Me, "*", l)
Dim evh As EventHandler = AddressOf ChangesMade
For Each c As Control In l
If TypeOf c Is TextBox Then
Dim ctl As TextBox = c
AddHandler ctl.TextChanged, evh
End If
If TypeOf c Is MaskedTextBox Then
Dim ctl As MaskedTextBox = c
AddHandler ctl.TextChanged, evh
End If
If TypeOf c Is ComboBox Then
Dim ctl As ComboBox = c
AddHandler ctl.SelectedValueChanged, evh
End If
If TypeOf c Is CheckBox Then
Dim ctl As CheckBox = c
AddHandler ctl.CheckedChanged, evh
End If
Next
End Sub
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition