- Home
·
- OLE/COM/DCOM/Active-X
·
- Various Techniques For Initializing Properties To Default Values In The Initproperties Event Proced
Various Techniques For Initializing Properties To Default Values In The Initproperties Event Proced
Various Techniques For Initializing Properties To Default Values In The Initproperties Event Procedure
Rate Various Techniques For Initializing Properties To Default Values In The Initproperties Event Proced
(1(1 Vote))
Private Const defCelsius = 30
Private m_TemperatureDate As Date
Private m_Celsius As Single
Private m_Caption as String
Private Sub UserControl_InitProperties()
'Set temperaturedate to a value
'determined right here
m_TemperatureDate = DateSerial(1997, 1, 1)
'Set Celsius to a default
'constant value
m_Celsius = defCELSIUS
'Compute Fahrenheit from that
RecalcFahrenheitFromCelsius m_Celsius
'Set the Background color to
'match the container's background
BackColor = Ambient.BackColor
'Set the caption to be the
'same as the object's initial name
'm_Caption = Extender.Name
'and set Slider to reflect temperature
Slider1.Value = m_Celsius
'and textbox to match date
txtDate.Text = m_TemperatureDate
End Sub
Various Techniques For Initializing Properties To Default Values In The Initproperties Event Proced Comments
No comments yet — be the first to post one!
Post a Comment