
Help Raising Events in User Controls
The RaiseEvent command is designed for use in a control which needs to
communicate certain activities with its host. For example, I wrapped the
MSComm control in a user control and had the user control fire an event only
when MSComm detected a certain character (which indicated that the received
message was complete). Inside my user control, I depended on the OnComm
event within MSComm to fire by itself and it does (much like your experience
with the Click event). As the designer of the control, you must determine
what kind of information must be communicated to a host and how. An event
is one method.
As for Event arguments, these may contain information about the event so
that the host may react accordingly. For example, you could pass a status
through an event argument which the host could review using If..Then or
Select Case.
Does that help?
Joe
<snip>