Library code snippets
Display UserControl properties in the Property Window
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.
Related articles
Related discussion
-
sending sms from pc
by sriraj20074 (0 replies)
-
Automating Excel from VB6.0
by epurdy (0 replies)
-
VB6 system conversion using VBA to Word 2007
by b.macgregor@vodamail.co.za (0 replies)
-
video not working with visual basic
by Jupiter 2 (9 replies)
-
Hyperterminal Data
by sengreen (1 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Hi
I want to display property page at run time so how can i show the property page at run time of a activeX control.
plz comment soon
Thanx
Regards
Mahesh
This thread is for discussions of Display UserControl properties in the Property Window.