you know how ocx's have ocx1.something
how do I make my own something, like
ocx1.backcolor = vbblue
how can I get my own stuff to some up after the . and work
Printable View
you know how ocx's have ocx1.something
how do I make my own something, like
ocx1.backcolor = vbblue
how can I get my own stuff to some up after the . and work
Use the property Get/Set/Let statements
Code:Private lMaxValue As Long
Property Get MaxValue() As Long
'return the max value of the bar
MaxValue = lMaxValue
End Property
Property Let MaxValue(MaxValue As Long)
'set the max value
lMaxValue = MaxValue
End Property
so can you give me an example of how I can make it change the back color thourgh that way
Code:Private lBackColour As Long
Property Get BackColor() As Long
BackColor = lBackColour
End Property
Property Let BackColor(Color As Long)
lBackColour = Color
'then set the backcolour of whatever
End Property
thanks
If you use OLE_COLOR instead of long, you get the button with the ... on it with which you can select a custom colour, and you get the drop down with system colours...