永发信息网

VB调色板的代码

答案:1  悬赏:0  手机版
解决时间 2021-11-20 23:50
  • 提问者网友:太高姿态
  • 2021-11-20 17:00
VB调色板的代码
最佳答案
  • 五星知识达人网友:不甚了了
  • 2021-11-20 18:18
Dim r%, g%, b%
Private Sub Form_Load()
HScroll1.Min = 0
HScroll1.Max = 255
HScroll2.Min = 0
HScroll2.Max = 255
HScroll3.Min = 0
HScroll3.Max = 255
HScroll1.LargeChange = 50
HScroll2.LargeChange = 50
HScroll3.LargeChange = 50
HScroll4.Min = 9
HScroll4.Max = 30
HScroll4.LargeChange = 5
End Sub

Private Sub HScroll1_Change()

r = HScroll1.Value
If Option1 Then
Text1.ForeColor = RGB(r, g, b)
ElseIf Option2 Then
Text1.BackColor = RGB(r, g, b)
Else
End If
End Sub

Private Sub HScroll2_Change()
g = HScroll2.Value
If Option1 Then
Text1.ForeColor = RGB(r, g, b)
ElseIf Option2 Then
Text1.BackColor = RGB(r, g, b)
Else
End If
End Sub

Private Sub HScroll3_Change()
b = HScroll3.Value
If Option1 Then
Text1.ForeColor = RGB(r, g, b)
ElseIf Option2 Then
Text1.BackColor = RGB(r, g, b)
Else
End If
End Sub

Private Sub HScroll4_Change()
Text1.FontSize = HScroll4.Value
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯