M
Matteo Gabella
Hi all,
i have to handle all the controls of the form at one time, because the
'keypreview' property of the form is missing so I need to implement
myself...
because of that I want to concentrate all the keypress event of the
controls in a generic controls_keypress...
it'easy, but what if I have 50 controls on the form? Do I have to
write
Private Sub controls_keypress (ByVal sender As System.Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles _
Txt1.KeyPress, _
Txt1.KeyPress, _
.....
Txt50.KeyPress
Or is there a faster way? Should I use controls arrays? Controls
collection?
Thank you
matteo
i have to handle all the controls of the form at one time, because the
'keypreview' property of the form is missing so I need to implement
myself...
because of that I want to concentrate all the keypress event of the
controls in a generic controls_keypress...
it'easy, but what if I have 50 controls on the form? Do I have to
write
Private Sub controls_keypress (ByVal sender As System.Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles _
Txt1.KeyPress, _
Txt1.KeyPress, _
.....
Txt50.KeyPress
Or is there a faster way? Should I use controls arrays? Controls
collection?
Thank you
matteo