Option Explicit 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,BackColor Public Property Get BackColor() As OLE_COLOR BackColor = Texter.BackColor End Property Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR) Texter.BackColor() = New_BackColor PropertyChanged "BackColor" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,ForeColor Public Property Get ForeColor() As OLE_COLOR ForeColor = Texter.ForeColor End Property Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR) Texter.ForeColor() = New_ForeColor PropertyChanged "ForeColor" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,Enabled Public Property Get Enabled() As Boolean Enabled = Texter.Enabled End Property Public Property Let Enabled(ByVal New_Enabled As Boolean) Texter.Enabled() = New_Enabled PropertyChanged "Enabled" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,Font Public Property Get Font() As Font Set Font = Texter.Font End Property Public Property Set Font(ByVal New_Font As Font) Set Texter.Font = New_Font PropertyChanged "Font" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,BorderStyle Public Property Get BorderStyle() As Integer BorderStyle = Texter.BorderStyle End Property Public Property Let BorderStyle(ByVal New_BorderStyle As Integer) Texter.BorderStyle() = New_BorderStyle PropertyChanged "BorderStyle" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Texter,Texter,-1,Text Public Property Get Caption() As String Caption = Texter.Text End Property Public Property Let Caption(ByVal New_Caption As String) Texter.Text() = New_Caption PropertyChanged "Caption" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=Captioner,Captioner,-1,Caption Public Property Get TextOfLabel() As String TextOfLabel = Captioner.Caption End Property Public Property Let TextOfLabel(ByVal New_TextOfLabel As String) Captioner.Caption() = New_TextOfLabel PropertyChanged "TextOfLabel" End Property 'Load property values from storage Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Texter.BackColor = PropBag.ReadProperty("BackColor", &H80000005) Texter.ForeColor = PropBag.ReadProperty("ForeColor", &H80000008) Texter.Enabled = PropBag.ReadProperty("Enabled", True) Set Texter.Font = PropBag.ReadProperty("Font", Ambient.Font) Texter.BorderStyle = PropBag.ReadProperty("BorderStyle", 1) Texter.Text = PropBag.ReadProperty("Caption", "Text1") Captioner.Caption = PropBag.ReadProperty("TextOfLabel", "Label1") End Sub 'Write property values to storage Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("BackColor", Texter.BackColor, &H80000005) Call PropBag.WriteProperty("ForeColor", Texter.ForeColor, &H80000008) Call PropBag.WriteProperty("Enabled", Texter.Enabled, True) Call PropBag.WriteProperty("Font", Texter.Font, Ambient.Font) Call PropBag.WriteProperty("BorderStyle", Texter.BorderStyle, 1) Call PropBag.WriteProperty("Caption", Texter.Text, "Text1") Call PropBag.WriteProperty("TextOfLabel", Captioner.Caption, "Label1") End Sub |