Hi everyone,

Two forms in a VB6 project my company uses are very much alike, and therefore a class exists with centralized code that serves both forms.
I have to remove a TabStrip control from both forms, and replace it with a series of PictureBoxes next to each other. Each PictureBox represents a tab: it must be colored differently when a user clicks it, a box should be drawn on it when it gets the focus, et cetera. The PictureBoxes are in a control array.
The original code had the TabStrip passed to the class, declared as
Code:
Private WithEvents obmdTab As TabStrip
, and the class handled
Code:
Private Sub obmdTab_Click()
.
Instead, I now have to declare something like
Code:
Private WithEvents obmdPic As "PictureBox-controlarray"
, and the class should handle
Code:
Private Sub obmdPic_Click()
, which, among other things, should take care of recoloring the PictureBoxes. The Index of the clicked PictureBox obviously should therefore be known to the class as well.

How can I get this all working? What code should replace
Code:
Private WithEvents obmdPic() As "PictureBox-controlarray"
and how do I get
Code:
Private Sub obmdPic_Click()
- if that is the right signature - firing at the right time?

Thanks!
Cooz