📄 frmcolors.frm
字号:
Height = 345
Left = 120
TabIndex = 1
Tag = "TitleColor"
Top = 0
Width = 885
End
Begin VB.Label lblLabelColor
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Text Color"
ForeColor = &H00000000&
Height = 225
Left = 840
TabIndex = 0
Tag = "Label"
ToolTipText = "Click here to set the color of all labels"
Top = 1200
Width = 825
End
Begin VB.Image Image2
Height = 330
Left = 480
Picture = "FrmColors.frx":859C
ToolTipText = "Settings"
Top = 1920
Width = 1425
End
Begin VB.Image Image1
Height = 330
Left = 2640
Picture = "FrmColors.frx":8CAB
ToolTipText = "Settings"
Top = 1920
Width = 1425
End
Begin VB.Image Image3
Height = 330
Left = 480
Picture = "FrmColors.frx":93BA
ToolTipText = "Settings"
Top = 3840
Width = 1425
End
Begin VB.Image Image10
Height = 330
Left = 2880
Picture = "FrmColors.frx":9AC9
ToolTipText = "Settings"
Top = 3840
Width = 1425
End
Begin VB.Image Image11
Height = 330
Left = 2880
Picture = "FrmColors.frx":A1D8
ToolTipText = "Settings"
Top = 3480
Width = 1425
End
End
Attribute VB_Name = "FrmColors"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'For Dragging Borderless Forms...
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetWindowRgn Lib "User32" (ByVal hwnd As Long, ByVal hrgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function ReleaseCapture Lib "User32" () As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Dim sControlSelected As String
Dim sControlSelected1 As String
Dim sControlSelected2 As String
Private Sub Form_Load()
Dim AutoApply As String
AutoApply = ReadINI("colors", "autoapply", App.Path & "\settings.ini")
If AutoApply = "unchecked" Then
Image14.Picture = Image13.Picture
End If
If AutoApply = "checked" Then
Image14.Picture = Image12.Picture
End If
Me.Height = 4485
Me.Width = 4590
sControlSelected = "text"
sControlSelected1 = "text1"
sControlSelected2 = "text2"
Call imgSelected_Click(0)
Call imgSelected1_Click(0)
Call imgSelected2_Click(0)
Call LoadColors
Call SetColors(Me)
Me.Top = Screen.Height / 2 - Me.Height / 2 + 350
Me.Left = Screen.Width / 2 - Me.Width / 2
DoEvents
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Call DragForm(Me)
DoEvents
End If
End Sub
Private Sub imgClose_Click()
Unload Me
End Sub
Private Sub imgClose_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
imgClose.Picture = Image5.Picture
End If
End Sub
Private Sub imgClose_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
imgClose.Picture = Image8.Picture
End If
End Sub
Private Sub imgSelected_Click(Index As Integer)
Dim X As Byte
'Clear the radio buttons...
For X = 0 To 2
imgSelected(X).Picture = Image6.Picture
Next X
'Update the radio buttons...
imgSelected(Index).Picture = Image9.Picture
'Remember the control selected...
Select Case Index
Case 0
sControlSelected = "title"
Case 1
sControlSelected = "text"
Case 2
sControlSelected = "bar"
End Select
End Sub
Private Sub imgSelected1_Click(Index As Integer)
Dim X As Byte
'Clear the radio buttons...
For X = 0 To 1
imgSelected1(X).Picture = Image6.Picture
Next X
'Update the radio buttons...
imgSelected1(Index).Picture = Image9.Picture
'Remember the control selected...
Select Case Index
Case 0
sControlSelected1 = "title1"
Case 1
sControlSelected1 = "text1"
End Select
End Sub
Private Sub imgSelected2_Click(Index As Integer)
Dim X As Byte
'Clear the radio buttons...
For X = 0 To 2
imgSelected2(X).Picture = Image6.Picture
Next X
'Update the radio buttons...
imgSelected2(Index).Picture = Image9.Picture
'Remember the control selected...
Select Case Index
Case 0
sControlSelected2 = "title2"
Case 1
sControlSelected2 = "text2"
Case 2
sControlSelected2 = "bar2"
End Select
End Sub
Private Sub Label10_Click()
On Local Error Resume Next
'Set the Dialog boxes color to the color of the control that is selected...
If sControlSelected2 = "title2" Then
Dialog.Color = Label11.ForeColor
ElseIf sControlSelected2 = "text2" Then
Dialog.Color = Label14.ForeColor
ElseIf sControlSelected2 = "bar2" Then
Dialog.Color = Label13.ForeColor
End If
'Show the color Dialog box...
Dialog.Flags = cdlCCFullOpen Or cdlCCRGBInit
Dialog.ShowColor
If Err.Number > 0 Then Exit Sub
DoEvents
'Set the color to the control currently selected...
If sControlSelected2 = "title2" Then
Label11.ForeColor = Dialog.Color
End If
If sControlSelected2 = "text2" Then
Label14.ForeColor = Dialog.Color
End If
If sControlSelected2 = "bar2" Then
Label13.ForeColor = Dialog.Color
End If
DoEvents
If Image14.Picture = Image12.Picture Then
Call Label15_Click
End If
End Sub
Private Sub Label12_Click()
On Local Error Resume Next
'Set the Dialog boxes color to the color of the control that is selected...
If sControlSelected = "title" Then
Dialog.Color = Label2.ForeColor
ElseIf sControlSelected = "text" Then
Dialog.Color = lblLabelColor.ForeColor
ElseIf sControlSelected = "bar" Then
Dialog.Color = Label1.ForeColor
End If
'Show the color Dialog box...
Dialog.Flags = cdlCCFullOpen Or cdlCCRGBInit
Dialog.ShowColor
If Err.Number > 0 Then Exit Sub
DoEvents
'Set the color to the control currently selected...
If sControlSelected = "title" Then
Label2.ForeColor = Dialog.Color
End If
If sControlSelected = "text" Then
lblLabelColor.ForeColor = Dialog.Color
End If
If sControlSelected = "bar" Then
Label1.ForeColor = Dialog.Color
End If
DoEvents
If Image14.Picture = Image12.Picture Then
Call Label15_Click
End If
End Sub
Private Sub Label12_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image2.Picture = Image4.Picture
End If
End Sub
Private Sub Label12_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image2.Picture = Image7.Picture
End If
End Sub
Private Sub Label15_Click()
Call Me.SaveChanges
DoEvents
Call LoadColors
Call SetColors(Me)
Call SetColors(FrmMain)
Call SetColors(FrmStats)
Call SetColors(FrmDesktop)
End Sub
Private Sub Label15_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image11.Picture = Image4.Picture
End If
End Sub
Private Sub Label15_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image11.Picture = Image7.Picture
End If
End Sub
Private Sub Label5_Click()
On Local Error Resume Next
'Set the Dialog boxes color to the color of the control that is selected...
If sControlSelected1 = "title1" Then
Dialog.Color = Label6.ForeColor
ElseIf sControlSelected1 = "text1" Then
Dialog.Color = Label8.ForeColor
End If
'Show the color Dialog box...
Dialog.Flags = cdlCCFullOpen Or cdlCCRGBInit
Dialog.ShowColor
If Err.Number > 0 Then Exit Sub
DoEvents
'Set the color to the control currently selected...
If sControlSelected1 = "title1" Then
Label6.ForeColor = Dialog.Color
End If
If sControlSelected1 = "text1" Then
Label8.ForeColor = Dialog.Color
End If
DoEvents
If Image14.Picture = Image12.Picture Then
Call Label15_Click
End If
End Sub
Private Sub Label5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image1.Picture = Image4.Picture
End If
End Sub
Private Sub Label5_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image1.Picture = Image7.Picture
End If
End Sub
Private Sub Label10_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image3.Picture = Image4.Picture
End If
End Sub
Private Sub Label10_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image3.Picture = Image7.Picture
End If
End Sub
Sub SaveChanges()
'On Local Error Resume Next
'Save the color settings to the skin scheme ini file...
Call WriteINI("colors", "maintextcolors", lblLabelColor.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "maintitlecolors", Label2.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "mainbarcolors", Label1.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "desktoptextcolors", Label14.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "desktoptitlecolors", Label11.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "desktopbarcolors", Label13.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "statstitlecolors", Label6.ForeColor, App.Path & "\settings.ini")
Call WriteINI("colors", "statstextcolors", Label8.ForeColor, App.Path & "\settings.ini")
If Image14.Picture = Image13.Picture Then
Call WriteINI("colors", "autoapply", "unchecked", App.Path & "\settings.ini")
End If
If Image14.Picture = Image12.Picture Then
Call WriteINI("colors", "autoapply", "checked", App.Path & "\settings.ini")
End If
End Sub
Private Sub Label7_Click()
Unload Me
End Sub
Private Sub Label7_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image10.Picture = Image4.Picture
End If
End Sub
Private Sub Label7_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Image10.Picture = Image7.Picture
End If
End Sub
Private Sub Image14_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
If Image14.Picture = Image13.Picture Then
Image14.Picture = Image12.Picture
Exit Sub
End If
If Image14.Picture = Image12.Picture Then
Image14.Picture = Image13.Picture
End If
End If
End Sub
Public Sub DragForm(Frm As Form)
On Local Error Resume Next
'Move the borderless form...
Call ReleaseCapture
Call SendMessage(Frm.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -