clor
ActiveWorkbook.Colors(1)
=
oldcolor
If
Application.Dialogs(xlDialogEditColor).Show(1)
=
True
Then
clor
=
ActiveWorkbook.Colors(1)
End
If
ActiveWorkbook.Colors(1)
=
oldcolor
这个程序亩型可以调用侍备调色板,其中的ActiveWorkbook.Colors(1)就是取到的当前颜老耐毁色值
Option ExplicitPrivate Sub Form_Load()
HScroll1.Max = 255: HScroll2.Max = 255: HScroll3.Max = 255
HScroll1.Min = 0: HScroll2.Min = 0: HScroll3.Min = 0
春册HScroll1.Value = 0: HScroll2.Value = 0: HScroll3.Value = 0
Call setColor1
End Sub
Private Sub setColor1()
Dim r As Integer, g As Integer, b As Integer
r = HScroll1.Value: Text1.Text = r
g = HScroll2.Value: Text2.Text = g
b = HScroll3.Value: Text3.Text = b
Label4.BackColor = RGB(r, g, b)
End Sub
Private Sub setColor2()
Dim r As Integer, g As Integer, b As Integer
伏慧 r = Val(Text1.Text): HScroll1.Value = r
g = Val(Text2.Text): HScroll2.Value = g
b = Val(Text3.Text): HScroll3.Value = b
Label4.BackColor = RGB(r, g, b)
End Sub
Private Sub 扒厅宏HScroll1_Change()
Call setColor1
End Sub
Private Sub HScroll2_Change()
Call setColor1
End Sub
Private Sub HScroll3_Change()
Call setColor1
End Sub
Private Sub Text1_Change()
Call setColor2
End Sub
Private Sub Text2_Change()
Call setColor2
End Sub
Private Sub Text3_Change()
Call setColor2
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)