esta bien este codigo?
Publicado por Carlos (3 intervenciones) el 02/09/2005 22:48:51
Pues eso, que estoy creando un ocx con un picture y me esta dando problemas:
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
On Error Resume Next
Call PropBag.WriteProperty("LPic", Picture1.Picture, Ambient.DisplayName)
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
On Error Resume Next
Picture1.Picture = PropBag.ReadProperty("LPic", Ambient.DisplayName)
End Sub
Public Property Get LPic() As Image
LPic = Picture1.Picture
End Property
Public Property Set LPic(ByVal NuevoValor As Image)
Picture1.Picture = LoadPicture(NuevoValor)
PropertyChanged "LPic"
End Property
La verdad es que he dudado mucho al crear la propiedad, decidme en que fallo.
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
On Error Resume Next
Call PropBag.WriteProperty("LPic", Picture1.Picture, Ambient.DisplayName)
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
On Error Resume Next
Picture1.Picture = PropBag.ReadProperty("LPic", Ambient.DisplayName)
End Sub
Public Property Get LPic() As Image
LPic = Picture1.Picture
End Property
Public Property Set LPic(ByVal NuevoValor As Image)
Picture1.Picture = LoadPicture(NuevoValor)
PropertyChanged "LPic"
End Property
La verdad es que he dudado mucho al crear la propiedad, decidme en que fallo.
Valora esta pregunta


0