Listbox event (number of rows changed)

I need to do something when the number of rows of a ListBox is changed (adding or removing).
But I found no event for this.
What should I do?
Any help?

In a listbox Subclass:

  1. Create New Events:
    RowsChanged
    CellBackgroundPaint(g as Graphics, row as Integer,column as Integer) As boolean

  2. Create a private property:
    RowCount as Integer = -1

In CellBackgroundPaint:

If me.ListCount <> RowCount Then Raise Event RowsChanged RowsChanged = me.listCount End if Return CellBackgroundPaint(g , row,column)

Thanks Karen.
Good suggestion

I’ve created a new Event Definition, but I can not write any code in it.
What am I doing wrong?

You can only put code in the event if you put the listbox subclass on a window.

Oh, perfect.
Thanks again.