📄 cchess.ctl
字号:
VERSION 5.00
Begin VB.UserControl Cchess
BackColor = &H00FFFFFF&
BackStyle = 0 '透明
ClientHeight = 825
ClientLeft = 0
ClientTop = 0
ClientWidth = 840
ScaleHeight = 825
ScaleWidth = 840
Begin VB.Label CchWord
BackColor = &H0080FFFF&
Caption = "车"
BeginProperty Font
Name = "楷体_GB2312"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 120
TabIndex = 0
Top = 120
Width = 495
End
End
Attribute VB_Name = "Cchess"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Dim ChessValue As Byte ''存储相棋的值,有两个数字,一个代表颜色,一个代表棋子
Dim CchessFillColor As ColorConstants
Dim cNoneCchess As Boolean
Public Event MouseMove() ''鼠标移动事件
Public Event Click() '' 单击
Public Property Get Value() As Byte
Value = ChessValue
End Property
Public Property Let Value(ByVal vNewValue As Byte)
ChessValue = vNewValue
End Property
Public Property Get FillColor() As ColorConstants
FillColor = CchessFillColor
End Property
Public Property Let FillColor(ByVal vNewValue As ColorConstants)
CchessFillColor = vNewValue
'Shape1.FillColor = vNewValue
CchWord.ForeColor = vNewValue
End Property
Public Property Get NoneCchess() As Boolean
NoneCchess = cNoneCchess
End Property
Public Property Let NoneCchess(ByVal vNewValue As Boolean)
cNoneCchess = vNewValue
If vNewValue = True Then
If ChessBoardType = NullIsNone Or ChessBoardType <> NullIsCircle Then CchWord.Visible = False ': Shape1.Visible = False
If ChessBoardType = NullIsCircle Then CchWord.Caption = "●": CchWord.Visible = True
Else
CchWord.Visible = True
'Shape1.Visible = True
End If
End Property
Public Property Get Text() As String
Text = CchWord.Caption
End Property
Public Property Let Text(ByVal vNewValue As String)
CchessText = vNewValue
CchWord.Caption = vNewValue
End Property
Private Sub CchWord_Click()
RaiseEvent Click
End Sub
Private Sub CchWord_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseMove
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -