Setting ActiveX control properties with tags

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am writing an ActiveX control that gets information from the serial
port and displays the results in a label.  I have declared the property
"value" that will hold this data.  This control is going to act as a
field of a form and needs to be able to have its value set using HTML
for when it is used to edit records.  If I use JavaScript, I can get
and set the value property.  However, using the <param> tag seems to
have no effect on the control.

Here is the <object> tag:

                <param name="value" value="hello" />

Here is the related VB code in the ActiveX control:

Dim barCode as String

Public Property Get value() As String
    value = barCode
End Property

Public Property Let value(ByVal oldCode As String)
    barCode = oldCode
    lblBarcode.Caption = barCode
    PropertyChanged "value"
End Property

Public Property Set value(ByRef oldCode As Variant)
    barCode = oldCode
    lblBarcode.Caption = barCode
    PropertyChanged "value"
End Property

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    barCode = PropBag.ReadProperty("value")
    PropertyChanged "value"
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    PropBag.WriteProperty "value", barCode
End Sub

Anyone have any ideas?  This is the first time that I have written an
ActiveX control and I can't seem to find this question answered

One more thing: Is there a way that I can make the value property of
the ActiveX control be submitted with the form without having to use
JavaScript to copy the value into a hidden field?


Re: Setting ActiveX control properties with tags

Chris Lieb wrote:
Quoted text here. Click to load it

I would go to a VB group


Re: Setting ActiveX control properties with tags

Well, I tried microsoft.public.vb.general, but no one there seems to be
very helpful.


Site Timeline