Just define a property of type IPictureDisp .
Public Property Get Picture() As IPictureDisp Set Picture = UserControl.Picture End Property Public Property Set Picture(ByVal p As IPictureDisp) Set UserControl.Picture = p PropertyChanged "Picture" End Property
Remember to save / read from the gaskets:
Private Sub UserControl_ReadProperties(PropBag As PropertyBag) With PropBag ... Set Me.Picture = .ReadProperty("Picture", Nothing) ... End With End Sub Private Sub UserControl_WriteProperties(PropBag As PropertyBag) With PropBag ... .WriteProperty "Picture", Me.Picture, Nothing ... End With End Sub
GSerg source share