At design-time, when you set a control's property value, Visual
Basic often provides a list of valid settings in a dropdown list.
To display such a list for your own custom UserControl property
settings, you'll need to add an enumerated property to your
ActiveX Control project. To do so, declare the property's
potential values with the Enum statement, like soPublic Enum UCBorderStyles
UCBorderNone = 0
UCBorderFlat = 1
UCBorderThin = 2
UCBorderFrame = 3
UCBorderThick = 4
End Enum
Once you've established the potential values, you'll need to use
the enumerated type in the Property Let and Get statements, as inPrivate mintBorderStyle As UCBorderStyles
Public Property Get BorderStyle() As UCBorderStyles
BorderStyle = mintBorderStyle
End Property
Public Property Let BorderStyle(val As UCBorderStyles)
mintBorderStyle = val
End Property
Now, when Visual Basic instantiates the control at design time,
the valid UCBorderStyles will appear in the Property Window's
dropdown list for the BorderStyle property.
Display UserControl properties in the Property Window
By ElementK Journals, published on 14 Jul 2001
| Filed in
You might also like...
VB 6 forum discussion
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
client/server application using activex
by beautifulheart (0 replies)
-
System Error &H8007007E. The specifed module could not be found.
by swiftsafe (5 replies)
-
Invitation to take part in an academic research study
by researchlab (0 replies)
-
Send SMS with SMPP
by mmahmoud (0 replies)
VB 6 podcasts
-
Stack Overflow Podcast: Podcast #45 – Keeping it Sharp
Published 7 years ago, running time 0h54m
Our guest this week is Eric Lippert – language architect extraordinaire and famous for all his work at Microsoft in developing their languages Eric joined Microsoft right out of college and was originally working on VB It’s time for everyone’s favorite game: Name the Worst Feature of that Microso.
Comments