Those things are simply for the event handlers. When you handle an event, there are always two parameters:
sender is the object which invoked the event. If your event handler only has one object attached to it, it will always be that object. If it has more than one object attached to it (for example, 5 buttons that all use the same event handler), it will depend on the control who's event was triggered.
e is an EventArgs object, or subclass thereof that contains arguments specifically pertaining to that event. Generally, there is a special EventArgs object (inherited from the EventArgs class) for each event. For example, the MouseMove handler will have a
MouseEventArgs object, which contains the X and Y coords, the state of the buttons, etc.
These things only apply to event handlers though; you don't need them for regular subroutines. To create a subroutine that takes parameters:
Visual Basic:
Private Sub MySub(ByVal a As Integer)
MessageBox.Show("You passed " & a.ToString())
End Sub
The sub would then be accessed by
You can also create optional parameters, or parameters of different types using overloading. In addition to the first example I gave, you could create this sub:
Visual Basic:
Private Sub MySub() 'note the lack of any parameters
MySub(100) 'call the [i]other[/i] MySub with 100 as the parameter
End Sub
Then both of these would be valid:
Visual Basic:
MySub(5) 'shows "You passed 5" in the message box
MySub() 'shows "You passed 100" in the message box
You can read more about subroutines and overloading them in the MSDN.