Private Sub UserControl_InitProperties()
Caption = Ambient.DisplayName
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=Label1,Label1,-1,ForeColor
Public Property Get FontColor() As OLE_COLOR
FontColor = Label1.ForeColor
End Property
Public Property Let FontColor(ByVal New_ForeColor As OLE_COLOR)
Label1.ForeColor() = New_ForeColor
PropertyChanged "FontColor"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=Label1,Label1,-1,Font
Public Property Get Font() As Font
Set Font = Label1.Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set Label1.Font = New_Font
PropertyChanged "Font"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=Label1,Label1,-1,Caption
Public Property Get Caption() As String
Caption = Label1.Caption
End Property
Public Property Let Caption(ByVal New_Caption As String)
Label1.Caption() = New_Caption
PropertyChanged "Caption"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=Check1,Check1,-1,Value
Public Property Get FontStyle() As Integer
FontStyle = Check1.Value
End Property
Public Property Let FontStyle(ByVal New_Style As Integer)
Check1.Value() = New_Style
PropertyChanged "FontStyle"
End Property
'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Label1.ForeColor = PropBag.ReadProperty("FontColor", &H80000012)
Set Label1.Font = PropBag.ReadProperty("Font", Ambient.Font)
Label1.Caption = PropBag.ReadProperty("Caption", "Label1")
Check1.Value = PropBag.ReadProperty("FontStyle", 1)
End Sub
'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("ForeColor", Label1.ForeColor, &H80000012)
Call PropBag.WriteProperty("Font", Label1.Font, Ambient.Font)
Call PropBag.WriteProperty("Caption", Label1.Caption, "Label1")
Call PropBag.WriteProperty("FontStyle", Check1.Value, 1)
End Sub