Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PropertyBag Problem?
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00783792
Message ID:
00813388
Views:
6
>I created an ActiveX control, with a property called Enabled. There is a
>label on the control which I want to turn dark grey when the enabled
>property is set to False.
>
>The enabled property does not persist from design time into
>run time. Here's the code:

Add the following code to your let property in order to persist the value.
The color code will run at both client run time and user run time.
Public Property Let Enabled(ByVal bNewValue As Boolean)

  bEnabled = bNewValue

  If bNewValue Then
    lblCaption.ForeColor = &H80000012
  Else
    lblCaption.ForeColor = &H80000011
  End If

  ' ===== start Joe code =======
  Propertychanged "Enabled"  ' Persist data - Make this the last item in the property
  ' ===== end Joe code =========

End Property
HTH,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform