朋友不吝指导,请进来看看
这是书中的代码,意在创建滚动条调整颜色,总共有3个滚动条,颜色分别是控制红,绿,蓝!不明白代码中的redtxt.Text, greentxt.Text,bluetxt.Text
编译就在这几个东西上面出错!
希望大家知道原因和解决办法的朋友,能给点指导
谢谢了!
Private Sub Form_Load()
redtxt.Text = CStr(redscr.Value)
greentxt.Text = CStr(greenscr.Value)
bluetxt.Text = CStr(bluescr.Value)
End Sub
Private Sub redscr_change()
redtxt.Text = CStr(redscr.Value)
Call dis_clr
End Sub
Private Sub greenscr_change()
greentxt.Text = CStr(greenscr.Value)
Call dis_clr
End Sub
Private Sub bluescr_change()
bluetxt.Text = CStr(bluescr.Value)
Call dis_clr
End Sub
Private Sub redtxt_change()
redscr.Value = CInt(redtxt.Text)
Call dis_clr
End Sub
Private Sub greentxt_change()
greenscr.Value = CInt(greentxt.Text)
Call dis_clr
End Sub
Private Sub bluetxt_change()
bluescr.Value = CInt(bluetxt.Text)
Call dis_clr
End Sub
Sub dis_clr()
Label1.BackColor = RGB(redscr.Value, greenscr.Value, bluescr.Value)
End Sub
[[it] 本帖最后由 cxhiou 于 2008-7-23 13:23 编辑 [/it]]