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:
00512471
Views:
9
This message has been marked as the solution to the initial question of the thread.
>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
É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