Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating control interface
Message
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00512378
Message ID:
00512832
Views:
10
Ok, one small question how do I make the _min/_max not show up in the property window as selections? I am using VB6SP3

>>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

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform