📄 frmsyscolor.frm
字号:
VERSION 5.00
Begin VB.Form frmSysColor
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Change SysColor"
ClientHeight = 2970
ClientLeft = 45
ClientTop = 330
ClientWidth = 6660
Icon = "frmSysColor.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2970
ScaleWidth = 6660
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdChange
Caption = "&Change"
Height = 555
Left = 5040
TabIndex = 20
Top = 825
Width = 1275
End
Begin VB.CommandButton cmdRestore
Caption = "&Restore"
Height = 555
Left = 5040
TabIndex = 19
Top = 1440
Width = 1275
End
Begin VB.CommandButton cmdExit
Caption = "E&xit"
Height = 555
Left = 5040
TabIndex = 17
Top = 2040
Width = 1275
End
Begin VB.PictureBox picColor
Height = 225
Index = 7
Left = 2190
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 16
Top = 1785
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 6
Left = 2190
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 15
Top = 1275
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 5
Left = 2190
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 14
Top = 795
Width = 255
End
Begin VB.CheckBox ChkColor
Caption = "Button Face"
Height = 405
Index = 7
Left = 2520
TabIndex = 13
Top = 1695
Width = 2115
End
Begin VB.CheckBox ChkColor
Caption = "Application Work Space"
Height = 405
Index = 6
Left = 2520
TabIndex = 12
Top = 1185
Width = 2115
End
Begin VB.CheckBox ChkColor
Caption = "In Active Border"
Height = 405
Index = 5
Left = 2520
TabIndex = 11
Top = 705
Width = 2115
End
Begin VB.PictureBox picColor
Height = 225
Index = 4
Left = 2190
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 10
Top = 300
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 3
Left = 75
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 9
Top = 1785
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 2
Left = 75
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 8
Top = 1305
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 1
Left = 75
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 7
Top = 810
Width = 255
End
Begin VB.PictureBox picColor
Height = 225
Index = 0
Left = 75
ScaleHeight = 165
ScaleWidth = 195
TabIndex = 6
Top = 315
Width = 255
End
Begin VB.CheckBox ChkColor
Caption = "Active Border"
Height = 405
Index = 4
Left = 2520
TabIndex = 5
Top = 210
Width = 2115
End
Begin VB.CheckBox ChkColor
Caption = "Window Frame"
Height = 405
Index = 3
Left = 420
TabIndex = 4
Top = 1680
Width = 1470
End
Begin VB.CheckBox ChkColor
Caption = "Window"
Height = 405
Index = 2
Left = 420
TabIndex = 3
Top = 1200
Width = 1470
End
Begin VB.CheckBox ChkColor
Caption = "Menu"
Height = 405
Index = 1
Left = 420
TabIndex = 2
Top = 705
Width = 1470
End
Begin VB.CheckBox ChkColor
Caption = "Back Ground"
Height = 405
Index = 0
Left = 420
TabIndex = 1
Top = 195
Width = 1470
End
Begin VB.CommandButton cmdApply
Caption = "&Apply"
Height = 555
Left = 5040
TabIndex = 0
Top = 210
Width = 1275
End
Begin VB.Label lblStatus
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 0
TabIndex = 18
Top = 2640
Width = 6615
End
End
Attribute VB_Name = "frmSysColor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'u don't need CommonDialog ctrl.
Private Type CHOOSECOLOR
lStructSize As Long
hwndOwner As Long
hInstance As Long
rgbResult As Long
lpCustColors As String
flags As Long
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Private Declare Function CHOOSECOLOR Lib "comdlg32.dll" Alias "ChooseColorA" (pChoosecolor As CHOOSECOLOR) As Long
Dim CustomColors() As Byte
'for manipulating cursor
Private Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function SetClassWord Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long
Private Declare Function DestroyCursor Lib "user32" (ByVal hCursor As Long) As Long
Const GCW_HCURSOR = (-12)
Const IDC_SIZEALL = 32646&
Const IDC_HAND = (32649)
Dim SysCursHandle As Long, WaitCursor As Long
Function GetRGB(RGBval As Long, Num As Integer) As Integer
' Check if Num, RGBval are valid.
If Num > 0 And Num < 4 And RGBval > -1 And RGBval < 16777216 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -