Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating control interface
Message
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00512378
Message ID:
00512693
Vues:
15
You Rock! Thank you once again and thank you for all the others who are learning while lurking. This is good stuff right here.

>>Excellent point. I will have to go and test that out. No doubt Something will need to be changed. :)
>
>If your values are successive, you can "hide" min and max values. The fun fact with these hidden values is that the programmer that will use your components won't see them.
>
>
Public Enum MyCoolListOfOptions
>   [_min] = 0  'This is a hidden value
>   Left = 0
>   Right = 1
>   Up = 2
>   Down = 3
>   [_max] = 3  'This is a hidden value
>End Enum
>
>Private m_eStyle As MyCoolListOfOptions ' establish a mod level var
>
>Public Property Get Style() As MyCoolListOfOptions
>   Style = m_eStyle    ' If asked be able to reply
>End Property
>
>Public Property Let Style(ByVal eStyle As MyCoolListOfOptions)
>    Debug.Print eStyle       ' For testing
>    if eStyle >= [_min] and eStyle <= [_max] then
>       m_eStyle = eStyle        ' If told be able to assign
>       PropertyChanged "Style"  ' Update property
>    else
>       err.raise 1,"Invalid value"
>    endif
>End Property
~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

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform