📄 button.ctl
字号:
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
UserControl.BackColor() = New_BackColor
PropertyChanged "BackColor"
DrawUserControl 1, New_ForeColor
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object."
ForeColor = UserControl.ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
UserControl.ForeColor() = New_ForeColor
PropertyChanged "ForeColor"
FColor = New_ForeColor
DrawUserControl 1, New_ForeColor
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Enabled
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
Enabled = UserControl.Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
UserControl.Enabled() = New_Enabled
PropertyChanged "Enabled"
DrawUserControl 1, ForeColor
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Font
Public Property Get Font() As Font
Attribute Font.VB_Description = "Returns a Font object."
Attribute Font.VB_UserMemId = -512
Set Font = UserControl.Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set UserControl.Font = New_Font
PropertyChanged "Font"
DrawUserControl 1, ForeColor
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Refresh
Public Sub Refresh()
Attribute Refresh.VB_Description = "Forces a complete repaint of a object."
UserControl.Refresh
DrawUserControl 1, ForeColor
End Sub
Private Sub UserControl_Click()
RaiseEvent Click
End Sub
'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
Set UserControl.Font = Ambient.Font
m_Caption = m_def_Caption
m_TextColor = m_def_TextColor
End Sub
'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
UserControl.BackColor = PropBag.ReadProperty("BackColor", &H8000000F)
UserControl.ForeColor = PropBag.ReadProperty("ForeColor", &H80000012)
UserControl.Enabled = PropBag.ReadProperty("Enabled", True)
Set UserControl.Font = PropBag.ReadProperty("Font", Ambient.Font)
m_Caption = PropBag.ReadProperty("Caption", m_def_Caption)
m_TextColor = PropBag.ReadProperty("TextColor", m_def_TextColor)
UserControl.FontBold = PropBag.ReadProperty("FontBold", 0)
UserControl.FontItalic = PropBag.ReadProperty("FontItalic", 0)
UserControl.FontName = PropBag.ReadProperty("FontName", "")
UserControl.FontSize = PropBag.ReadProperty("FontSize", 0)
UserControl.FontStrikethru = PropBag.ReadProperty("FontStrikethru", 0)
UserControl.FontUnderline = PropBag.ReadProperty("FontUnderline", 0)
UserControl.FontTransparent = PropBag.ReadProperty("FontTransparent", True)
DrawUserControl 1, 0
End Sub
'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("BackColor", UserControl.BackColor, &H8000000F)
Call PropBag.WriteProperty("ForeColor", UserControl.ForeColor, &H80000012)
Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True)
Call PropBag.WriteProperty("Font", UserControl.Font, Ambient.Font)
Call PropBag.WriteProperty("Caption", m_Caption, m_def_Caption)
Call PropBag.WriteProperty("TextColor", m_TextColor, m_def_TextColor)
Call PropBag.WriteProperty("FontBold", UserControl.FontBold, 0)
Call PropBag.WriteProperty("FontItalic", UserControl.FontItalic, 0)
Call PropBag.WriteProperty("FontName", UserControl.FontName, "")
Call PropBag.WriteProperty("FontSize", UserControl.FontSize, 0)
Call PropBag.WriteProperty("FontStrikethru", UserControl.FontStrikethru, 0)
Call PropBag.WriteProperty("FontUnderline", UserControl.FontUnderline, 0)
Call PropBag.WriteProperty("FontTransparent", UserControl.FontTransparent, True)
'DrawUserControl 1, 0
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,Button
Public Property Get Caption() As String
Caption = m_Caption
End Property
Public Property Let Caption(ByVal New_Caption As String)
m_Caption = New_Caption
PropertyChanged "Caption"
DrawUserControl 1, ForeColor
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=10,0,0,255
Public Property Get TextColor() As OLE_COLOR
TextColor = m_TextColor
End Property
Public Property Let TextColor(ByVal New_TextColor As OLE_COLOR)
m_TextColor = New_TextColor
PropertyChanged "TextColor"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontBold
Public Property Get FontBold() As Boolean
Attribute FontBold.VB_Description = "Returns/sets bold font styles."
FontBold = UserControl.FontBold
End Property
Public Property Let FontBold(ByVal New_FontBold As Boolean)
UserControl.FontBold() = New_FontBold
PropertyChanged "FontBold"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontItalic
Public Property Get FontItalic() As Boolean
Attribute FontItalic.VB_Description = "Returns/sets italic font styles."
FontItalic = UserControl.FontItalic
End Property
Public Property Let FontItalic(ByVal New_FontItalic As Boolean)
UserControl.FontItalic() = New_FontItalic
PropertyChanged "FontItalic"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontName
Public Property Get FontName() As String
Attribute FontName.VB_Description = "Specifies the name of the font that appears in each row for the given level."
FontName = UserControl.FontName
End Property
Public Property Let FontName(ByVal New_FontName As String)
UserControl.FontName() = New_FontName
PropertyChanged "FontName"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontSize
Public Property Get FontSize() As Single
Attribute FontSize.VB_Description = "Specifies the size (in points) of the font that appears in each row for the given level."
FontSize = UserControl.FontSize
End Property
Public Property Let FontSize(ByVal New_FontSize As Single)
UserControl.FontSize() = New_FontSize
PropertyChanged "FontSize"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontStrikethru
Public Property Get FontStrikethru() As Boolean
Attribute FontStrikethru.VB_Description = "Returns/sets strikethrough font styles."
FontStrikethru = UserControl.FontStrikethru
End Property
Public Property Let FontStrikethru(ByVal New_FontStrikethru As Boolean)
UserControl.FontStrikethru() = New_FontStrikethru
PropertyChanged "FontStrikethru"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontUnderline
Public Property Get FontUnderline() As Boolean
Attribute FontUnderline.VB_Description = "Returns/sets underline font styles."
FontUnderline = UserControl.FontUnderline
End Property
Public Property Let FontUnderline(ByVal New_FontUnderline As Boolean)
UserControl.FontUnderline() = New_FontUnderline
PropertyChanged "FontUnderline"
DrawUserControl 1, 0
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,FontTransparent
Public Property Get FontTransparent() As Boolean
Attribute FontTransparent.VB_Description = "Returns/sets a value that determines whether background text/graphics on a Form, Printer or PictureBox are displayed."
FontTransparent = UserControl.FontTransparent
End Property
Public Property Let FontTransparent(ByVal New_FontTransparent As Boolean)
UserControl.FontTransparent() = New_FontTransparent
PropertyChanged "FontTransparent"
DrawUserControl 1, 0
End Property
Public Property Get About()
MsgBox "Hello How Are You"
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -