Creating custom VB6 controls
Some controls contained into this package may have bad iterations when
used into Usercontrols.
This
because VB6 cannot detect, in some cases, that the usercontrol is in
Design or User mode so the control may appear running at design time
(so you cannot move it in many cases).
Controls that may have problems are: ctlUniTextBoxXP,
ctlUniRichTextBoxXP, ctlUniListBoxXP, ctlUniListBoxExXP,
ctlUniComboBoxXP
You can create your
usercontrols following these steps:
- Draw a control of the HexUniControls library (from the
above list)
into your usercontrol
- Set the ManualStart
property to true
so the control has to be
started manually using the ExternalInitControl
method
- At the end of your UserControl_ReadProperties
write this code:
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
If Ambient.UserMode Then
HexUniControl1.ExternalInitControl
End If
End Sub
How to manage 32bpp images on your usercontrols
Check these methods:
clsCommonWrapper_SetPropBagPicture32
clsCommonWrapper_GetPropBagPicture32