Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I'm Creating A Control .,..
Message
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00632847
Message ID:
00757761
Views:
13
This message has been marked as the solution to the initial question of the thread.
You did nothing!

Change:

Private Sub Class_WriteProperties(PropBag As PropertyBag)
Private Sub Class_ReadProperties(PropBag As PropertyBag)
Private Sub Class_InitProperties()

To:

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Private Sub UserControl_InitProperties()



>Ok, I'll try that. Sounds good
>
>I'v added a property, yet when I drop the control on the form, I see
>the control, but the default value is zero.
>
>Here's the code. What am I doing wrong?
>
>
>Private Const conDefaultRate = 6.125
>Private mInterestRate As Single
>'
>
>Public Property Let InterestRate(newRate As Single)
>   mInterestRate = newRate
>   PropertyChanged "InterestRate"
>End Property
>
>Public Property Get InterestRate() As Single
>   InterestRate = mInterestRate
>End Property
>
>Private Sub Class_WriteProperties(PropBag As PropertyBag)
>   PropBag.WriteProperty "InterestRate", mInterestRate, conDefaultRate
>End Sub
>
>Private Sub Class_ReadProperties(PropBag As PropertyBag)
>   mInterestRate = PropBag.ReadProperty("InterestRate", conDefaultRate)
>End Sub
>
>Private Sub Class_InitProperties()
>   mInterestRate = 1.252
>End Sub
>
>Private Sub UserControl_Initialize()
>
>End Sub
>
>
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform