OnEnter and GotFocus events

Using BCC builder 4, I derived a component from TEdit, put it into a package, and installed. All works fine, and I can control the OnEnter and OnExit events by overriding DoEnter and DoExit.

As I need to make it an ActiveX to be used by Visual Basic, I found the DoEnter and DoExit method are never called (I assumed it was implicit when TEdit got focus, but it is not).

I attempted to add a GotFocus and LostFocus pair of events by means of the type library editor, and then explicitly call m_VclCtl->DoEnter(): the source compiles, but VB complains it can't load my ocx any longer, not even in a new project.

What have I to do to motify these events to my ocx?

Aldo Marchioni