Make your own free website on
Make Your First ActiveX Control

Lesson 2
Tutorials - Page 1 - Page 2 - Page 3 - Page 4 - Page 5 - Page 6 - Page 7

Control's special events

Private Sub UserControl_Initialize()
End Sub

The code that you will insert to this sub, will run when
the user first place the control on the form on design time,
and on runtime, when the form with the control on it is loaded.

Private Sub UserControl_Show()
End Sub

This event occur instantly after the Initialize event occur.
The initialize event occur After the control is loaded and before
the Control is visible (to the programmer or the user that run the program)
and the Show event occur right after the Control is visible to the programmer/user.

You can browse for other event: At the control's code window,
choose UserControl from the left ComboBox under the title bar,
and choose event with the right ComboBox.

Image 18:

Back  Forward