How to create a Initialize event?
-
In VB 6.0: I create a simple OCX, i want to raise some event when the user control initialize. But the program does not runs correct. why? following is my program: In UserControl1.ctl: Public Event InitControl() Private Sub UserControl_Initialize() RaiseEvent InitControl End Sub In Form1.frm Private Sub UserControl11_InitControl() MsgBox "UserControl Init" End Sub Why the messagebox can not be shown when i start my program? thanks~~~~~~~~~~~
-
In VB 6.0: I create a simple OCX, i want to raise some event when the user control initialize. But the program does not runs correct. why? following is my program: In UserControl1.ctl: Public Event InitControl() Private Sub UserControl_Initialize() RaiseEvent InitControl End Sub In Form1.frm Private Sub UserControl11_InitControl() MsgBox "UserControl Init" End Sub Why the messagebox can not be shown when i start my program? thanks~~~~~~~~~~~
Hi, ActiveX has a lifecycle, please check the following article http://www.developerfusion.co.uk/show/1661/4/[^] Hope it helps :)
NajiCo http://www.InsideVB.NET[^] It's nice 2b important, but it's more important 2b nice...