3个回答
展开全部
放上一个Label1控件和一个HScroll1控件组(3个控件),再拷贝下列代码到代码窗口。
Private Sub Form_Load()
Dim i%
For i = 0 To 2
HScroll1(i).Min = 0
HScroll1(i).Max = 255
HScroll1(i).Value = 0
Next
End Sub
Private Sub HScroll1_Change(Index As Integer)
Label1.BackColor = RGB(HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value)
End Sub
Private Sub Form_Load()
Dim i%
For i = 0 To 2
HScroll1(i).Min = 0
HScroll1(i).Max = 255
HScroll1(i).Value = 0
Next
End Sub
Private Sub HScroll1_Change(Index As Integer)
Label1.BackColor = RGB(HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value)
End Sub
展开全部
放上一个Label1控件和一个VScroll1控件组(3个控件),再拷贝下列代码到代码窗口。Private Sub Form_Load()
VScroll1(0).Min = 0
VScroll1(0).Max = 255
VScroll1(1).Min = 0
VScroll1(1).Max = 255
VScroll1(2).Min = 0
VScroll1(2).Max = 255End SubPrivate Sub VScroll1_Change(Index As Integer)
Label1.ForeColor = RGB(VScroll1(0).Value, VScroll1(1).Value, VScroll1(2).
Value)End Sub.
VScroll1(0).Min = 0
VScroll1(0).Max = 255
VScroll1(1).Min = 0
VScroll1(1).Max = 255
VScroll1(2).Min = 0
VScroll1(2).Max = 255End SubPrivate Sub VScroll1_Change(Index As Integer)
Label1.ForeColor = RGB(VScroll1(0).Value, VScroll1(1).Value, VScroll1(2).
Value)End Sub.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
创建3个滚动条数组HScroll1(0),HScroll1(1),HScroll1(2)
Private Sub Form_Load()
HScroll1(0).Max = 255
HScroll1(1).Max = 255
HScroll1(2).Max = 255
HScroll1(0).Min = 0
HScroll1(1).Min = 0
HScroll1(2).Min = 0
End Sub
Private Sub HScroll1_Change(Index As Integer)
Form1.BackColor = RGB(HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value)
End Sub
Private Sub Form_Load()
HScroll1(0).Max = 255
HScroll1(1).Max = 255
HScroll1(2).Max = 255
HScroll1(0).Min = 0
HScroll1(1).Min = 0
HScroll1(2).Min = 0
End Sub
Private Sub HScroll1_Change(Index As Integer)
Form1.BackColor = RGB(HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询