Private New1 As Picture Public Property Set PictureIm(ByVal val As Picture) Set New1 = val PropertyChanged "PictureIm" usercontrol.Picture = New1 End Property Public Property Get PictureIm() As Picture Set PictureIm = New1 End Property Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Set New1 = PropBag.ReadProperty("new1", Nothing) End Sub Private Sub UserControl_WriteProperties(PropBag As PropertyBag) PropBag.WriteProperty "usuallyimage", New1, Nothing End Sub '这个是我写的,可以添加图片,但运行后图片就消失了!………… '哪位朋友知道怎么了
Public Property Set PictureIm(ByVal val As Picture)
Set New1 = val
PropertyChanged "PictureIm"
usercontrol.Picture = New1
End Property
Public Property Get PictureIm() As Picture
Set PictureIm = New1
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set New1 = PropBag.ReadProperty("new1", Nothing)
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "usuallyimage", New1, Nothing
End Sub
'这个是我写的,可以添加图片,但运行后图片就消失了!…………
'哪位朋友知道怎么了
PropBag.WriteProperty "pictureIm", New1, Nothing