📄 xpcheckbox.ctl
字号:
VERSION 5.00
Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
Begin VB.UserControl XpCheckBox
Alignable = -1 'True
Appearance = 0 'Flat
BackColor = &H80000005&
ClientHeight = 4065
ClientLeft = 0
ClientTop = 0
ClientWidth = 2340
FillStyle = 0 'Solid
ScaleHeight = 4065
ScaleWidth = 2340
ToolboxBitmap = "XpCheckBox.ctx":0000
Begin PicClip.PictureClip pc
Left = 0
Top = 480
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":0312
End
Begin PicClip.PictureClip pcChoice
Index = 11
Left = 0
Top = 3360
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":1B28
End
Begin PicClip.PictureClip pcChoice
Index = 10
Left = 0
Top = 3120
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":333E
End
Begin PicClip.PictureClip pcChoice
Index = 2
Left = 0
Top = 1200
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":4B54
End
Begin PicClip.PictureClip pcChoice
Index = 3
Left = 0
Top = 1440
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":636A
End
Begin PicClip.PictureClip pcChoice
Index = 7
Left = 0
Top = 2400
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":7B80
End
Begin PicClip.PictureClip pcChoice
Index = 0
Left = 0
Top = 720
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":9396
End
Begin VB.PictureBox p
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 240
Left = 0
ScaleHeight = 16
ScaleMode = 3 'Pixel
ScaleWidth = 16
TabIndex = 0
Top = 0
Width = 240
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 1920
Top = 0
End
Begin PicClip.PictureClip pcChoice
Index = 6
Left = 0
Top = 2160
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":ABAC
End
Begin PicClip.PictureClip pcChoice
Index = 1
Left = 0
Top = 960
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":C3C2
End
Begin PicClip.PictureClip pcChoice
Index = 4
Left = 0
Top = 1680
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":DBD8
End
Begin PicClip.PictureClip pcChoice
Index = 8
Left = 0
Top = 2640
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":F3EE
End
Begin PicClip.PictureClip pcChoice
Index = 12
Left = 0
Top = 3600
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":10C04
End
Begin PicClip.PictureClip pcChoice
Index = 5
Left = 0
Top = 1920
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":1241A
End
Begin PicClip.PictureClip pcChoice
Index = 13
Left = 0
Top = 3840
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":13C30
End
Begin PicClip.PictureClip pcChoice
Index = 9
Left = 0
Top = 2880
_ExtentX = 4128
_ExtentY = 344
_Version = 393216
Cols = 12
Picture = "XpCheckBox.ctx":15446
End
Begin VB.Label lbl
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000000&
BackStyle = 0 'Transparent
Caption = "Check1"
ForeColor = &H80000008&
Height = 195
Left = 375
TabIndex = 1
Top = 0
Width = 585
End
End
Attribute VB_Name = "XpCheckBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "User32" (lpPoint As POINT_API) As Long 'Aki
Private Declare Function ScreenToClient Lib "User32" (ByVal hwnd As Long, lpPoint As POINT_API) As Long
Private Type POINT_API
X As Long
Y As Long
End Type
Public Enum State
Unchecked = 0
Checked = 1
Mixed = 2
End Enum
Public Enum Pict
XP_Default = 0
XP_AccentedEdges = 1
XP_BlackWhite = 2
XP_Blue = 3
XP_Disco = 4
XP_Green = 5
XP_HighPass = 6
XP_Lily = 7
XP_MidlleAges = 8
XP_Orange = 9
XP_Red = 10
XP_Solarize = 11
XP_Spectrum = 12
XP_Yellow = 13
End Enum
Dim mPic As Pict
Const defPic = Pict.XP_Default
Dim mFont As Font
Dim mValue As State
Dim mBackColor As OLE_COLOR
Dim mForeColor As OLE_COLOR
Const defValue = State.Unchecked
Const defBackColor = vbButtonFace
Const defForeColor = vbBlack
Dim chVal, btnDown As Integer
Event Click()
Event KeyDown(KeyCode As Integer, Shift As Integer)
Event KeyPress(KeyAscii As Integer)
Event KeyUp(KeyCode As Integer, Shift As Integer)
Event MouseOut()
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseUp(Button, Shift, X, Y)
btnDown = 0
End Sub ' wssccc's qq 151884336
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Enabled = False Then Exit Sub
If mValue = Checked Then
p.Picture = pc.GraphicCell(6)
ElseIf mValue = Mixed Then
p.Picture = pc.GraphicCell(10)
ElseIf mValue = Unchecked Then
p.Picture = pc.GraphicCell(2)
End If
btnDown = 1
RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub ' wssccc's qq 151884336
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -