Dim a As Integer
Private Sub Command1_Click()
a = 1
End Sub
Private Sub Command2_Click()
a = 2
End Sub
Private Sub Form_Load()
HScroll1.Max = 255
HScroll2.Max = 255
HScroll3.Max = 255
HScroll1.LargeChange = 10
HScroll2.LargeChange = 10
HScroll3.LargeChange = 10
HScroll1.SmallChange = 1
HScroll2.SmallChange = 1
HScroll3.SmallChange = 1
a = 1
End Sub
Private Sub HScroll1_Change()
If a = 1 Then
Text1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
Else
Text1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End If
Label1.Caption = HScroll1.Value
Label2.Caption = HScroll2.Value
Label3.Caption = HScroll3.Value
End Sub
Private Sub HScroll2_Change()
HScroll1_Change
End Sub
Private Sub HScroll3_Change()
HScroll1_Change
End Sub
温馨提示:答案为网友推荐,仅供参考