-
Hi,
I am attempting to make an active x control, now on part of this control is a label, now I've made a property value called caption for this control and when it changes the labels caption is supposed to as well, now I have that much working at design time, when testing it I put it on my form, change the caption value and the labels caption changes, but at run time, the caption turns back to its default for some reason, can someone tell me how to keep the caption the same at runtime?.
thanx
-
Can you post some code up?
-
I think you ought to check in the propertybag write or save or let or whatever its called, just to ensure that it is saving what the last value was.
You may find that although it showing the correct value it is saving the default value, whic are obviously two diffenrt vars or a var and a const.
DocZaf
{;->
-
Public Property Get Caption() As String
Caption = label1.Caption
End Property
Public Property Let Caption(ByVal vCaption As String)
label1.Caption() = vCaption
PropertyChanged "Caption"
End Property
^^^ that is the only code I have linked to my labels caption, this is the first active x control that I am making that needs to be seen at run time, I have made a couple in the past but they weren't seen on the form, so I don't really know what I am doing that much with this control.
I didn't really get how to do what you are say Zaf Khan, could you explain it further or show me how to do it?
thanx
-
You ought to have some code with the keyword PROPERTYBAG somewher and you ought to look in there, my heads a bit fuzzy and i cannot remember the exact name of the function/procedure.
maybe propertybag_get or propertybag_set or propertybag_let
and one initialise the the control with the default/start up values and the other saves the values to the file
DocZaf
{;->