Here's a simple example of my problem...
Create a new Activex Control and just put a ComboBox on it.
Add a project and site the new Control.
Add this to the Form code. and run it.
*************** *************** *************** *
Option Explicit
Private Sub UserControl_Ini tialize()
MsgBox "Initialize "
Combo1.AddItem "Hello"
End Sub
Private Sub UserControl_Ini tProperties()
MsgBox "InitProperties "
End Sub
Private Sub UserControl_Rea dProperties(Pro pBag As PropertyBag)
MsgBox "ReadProperties "
End Sub
Private Sub UserControl_Res ize()
MsgBox "Resize"
End Sub
*************** *************** ******
I find it very curious that it does the Initialize event, then the Resize
event, then the ReadProperties event.
It seems that adding something to the ComboBox with AddNew does this.
When it's commented out it works like the docs say: Initialize event, then
the ReadProperties event, then the Resize event.
Am I not understanding something right, or is this not the right behaviour.
I guess the workaround must be to put this in the ReadProperties event?
I am using VB5, and have not made all that many controls.
Thanks for any help.
Create a new Activex Control and just put a ComboBox on it.
Add a project and site the new Control.
Add this to the Form code. and run it.
*************** *************** *************** *
Option Explicit
Private Sub UserControl_Ini tialize()
MsgBox "Initialize "
Combo1.AddItem "Hello"
End Sub
Private Sub UserControl_Ini tProperties()
MsgBox "InitProperties "
End Sub
Private Sub UserControl_Rea dProperties(Pro pBag As PropertyBag)
MsgBox "ReadProperties "
End Sub
Private Sub UserControl_Res ize()
MsgBox "Resize"
End Sub
*************** *************** ******
I find it very curious that it does the Initialize event, then the Resize
event, then the ReadProperties event.
It seems that adding something to the ComboBox with AddNew does this.
When it's commented out it works like the docs say: Initialize event, then
the ReadProperties event, then the Resize event.
Am I not understanding something right, or is this not the right behaviour.
I guess the workaround must be to put this in the ReadProperties event?
I am using VB5, and have not made all that many controls.
Thanks for any help.
Comment