DotNetWebTutor.com                                                    Link to Us

How do you know which control fired the event
Example
Private sub button1_click(byval sender as system.object, byVal e as system.eventargs)  handles button1.click

End sub

Passes 2 parameters
First-is called sender (type object)
This is the control that fired the event
By casting it to appropriate object, you can interact with it like any other control

Handles button1.click
This is what connects control to event

You can add several controls to an event :
Private sub button1_click(byval sender as system.object, byVal e as system.eventargs)  handles button1.click, button2,click, button2.click

End sub
vb controls common properties and events
Common properties and events
All controls come from system.windows.forms.controls
They inherit a common set of functions and properties and events

Name- name of the control
Backcolor-background color of control
Forecolor-color of text or foreground of control
Text- text the user sees inside the control
Size.width
Size.height
Location.x
Location.y
normal vs windows xp styles
Normal vs wndowsXP styles
Show each

vb contorls