Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What does With Events do?
Message
From
06/08/2003 01:20:08
 
 
To
05/08/2003 10:42:24
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00815351
Message ID:
00817178
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
The basic purpose of withevents is to access the events associated with a object.
There are instances when you want to customise existing controls for your needs, you add some additional events in your control by wrapping up existing controls.
These events can be accessed if a variable is defined with "withevents".
You dont declare a procedure with withevents.
It is use with variable/instances to get the events associated with the object.
I tell you a simple demo
Try this out in a project having reference to ADO library and see the differnce in the object & events list box
Dim rs As ADODB.Recordset
Dim WithEvents rs1 As ADODB.Recordset
You should see rs1 in the objects list and you will be able to handle events associated with it.
Best Luck..
Nilesh
Previous
Reply
Map
View

Click here to load this message in the networking platform