how to add events to a control ?

Ncode

Newcomer
Joined
Feb 22, 2003
Messages
15
i have a control (msflexgrid) and i want to add to the events list of that control deletecell event, so when a cell is deleted in the control this event raise
how can i do that ?
 
You need to add an event handler to a subroutine that you have available:

Say if you had a sub called DeleteCell,
then, when you initialize the MSFlexGrid, you would Add a handler to it (syntax depends on language), where, in this handler, you will specify a subroutine to call when this event is raised.

Of course, the control has to raise a DeleteCell event, otherwise you're out of luck. ;)
 
search help for this one at msdn
they are fairly easy to do but i think good documentation will be better (if microsofts documentation is considered good lol)

these two will get you started

WithEvents statement

AddHandler statement
 
Just a question :

Where did you found the MSFlexGrid control in .Net ?
Did you download it or used the OCX from VB6 ?
I just can't find it in the .net COM collection
 
Back
Top