home *** CD-ROM | disk | FTP | other *** search
-
- Private Sub UserControl_InitProperties()
-
- ' If the control's container is in design mode,
- ' disable the Timer, which causes the control to
- ' not function.
- tmrChkStatus.Enabled = Ambient.UserMode
-
- ' Set the default values for some properties.
-
- ' The Caption property defaults to the name
- ' assigned to the control by its container.
- Caption = Ambient.DisplayName
-
- ' The SelColor property defaults to the color
- ' yellow.
- SelColor = &H80FFFF
-
- ' The ButtonMode property defaults to
- ' Text Only Mode (0).
- ButtonMode = [Text Only Mode]
-
- End Sub
-
-
- Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
-
- ' If the control's container is in design mode,
- ' disable the Timer, which causes the control to
- ' not function.
- tmrChkStatus.Enabled = Ambient.UserMode
-
- ' Get properties from the property bag.
-
- BackColor = PropBag.ReadProperty("BackColor", &HFFFFFF)
- BorderStyle = PropBag.ReadProperty("BorderStyle", 1)
- ButtonMode = PropBag.ReadProperty("ButtonMode", mmodButtonMode)
- Caption = PropBag.ReadProperty("Caption", Ambient.DisplayName)
- ForeColor = PropBag.ReadProperty("ForeColor", &H80000008)
- SelColor = PropBag.ReadProperty("SelColor", &H80FFFF)
-
- Set Font = PropBag.ReadProperty("Font", mfonFont)
- Set Picture = PropBag.ReadProperty("Picture", Nothing)
- Set SelPicture = PropBag.ReadProperty("SelPicture", Nothing)
-
- End Sub
-
-
- Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
-
- ' Save properties to the property bag.
-
- PropBag.WriteProperty "BackColor", BackColor, &HFFFFFF
- PropBag.WriteProperty "BorderStyle", BorderStyle, 1
- PropBag.WriteProperty "ButtonMode", ButtonMode, mmodButtonMode
- PropBag.WriteProperty "Caption", Caption, Ambient.DisplayName
- PropBag.WriteProperty "ForeColor", ForeColor, &H80000008
- PropBag.WriteProperty "SelColor", SelColor, &H80FFFF
-
- PropBag.WriteProperty "Font", Font, mfonFont
- PropBag.WriteProperty "Picture", Picture, Nothing
- PropBag.WriteProperty "SelPicture", SelPicture, Nothing
-
- End Sub
-