作者r770619a (牛奶瓶/*蛤蜊杀手)
站内Visual_Basic
标题Re: [VB6 ] 小画家的橡皮擦写不出来?
时间Sun Nov 6 18:56:20 2005
顺道再问一下 因为我一开始画出来是黑色的
所以我的HScroll1应该也是要显示成黑色
但我变成白色~><" 请问要修哪呢?
※ 引述《r770619a (牛奶瓶/*蛤蜊杀手)》之铭言:
: 怎麽可能 橡皮擦这功能 我之前试可以
: 但是 现在 就是不行
: 乡民们 帮我看一下 哪边有错 谢谢!!
: Dim start_x
: Dim start_y
: Private Sub Command1_Click()
: End
: End Sub
: Private Sub Form_Load()
: HScroll1.Enabled = False
: HScroll2.Enabled = False
: HScroll3.Enabled = False
: End Sub
: Private Sub HScroll1_Scroll()
: LabelR = "R=" + Str(HScroll1.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub HScroll2_Scroll()
: LabelG = "G=" + Str(HScroll2.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub HScroll3_Scroll()
: LabelB = "B=" + Str(HScroll3.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub LabelB_Click()
: LabelB.Caption = "B=0"
: End Sub
: Private Sub LabelG_Click()
: LabelG.Caption = "G=0"
: End Sub
: Private Sub LabelR_Click()
: LabelR.Caption = "R=0"
: End Sub
: Private Sub Option1_Click()
: Picture2.DrawWidth = 10
: End Sub
: Private Sub Option2_Click()
: Picture2.DrawWidth = 1
: Option2.Enabled = True
: End Sub
: Private Sub Option3_Click()
: HScroll1.Enabled = True
: HScroll2.Enabled = True
: HScroll3.Enabled = True
: Option3.Enabled = True
: Picture2.DrawWidth = 1
: End Sub
: Private Sub Option7_Click()
: Picture2.DrawWidth = 10
: Picture2.ForeColor = QBColor(15)
: End Sub
: Private Sub Option8_Click()
: Picture2.Cls
: HScroll1.Enabled = True
: HScroll2.Enabled = True
: HScroll3.Enabled = True
: Picture2.DrawWidth = 1
: End Sub
: Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
: If Button = 1 Then
: start_x = x
: start_y = y
: End If
: End Sub
: Private Sub HScroll1_Change()
: LabelR = "R=" + Str(HScroll1.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub HScroll2_Change()
: LabelG = "G=" + Str(HScroll2.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub HScroll3_Change()
: LabelB = "B=" + Str(HScroll3.Value)
: Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: Picture2.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
: End Sub
: Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
: If Button = 1 Then
: If Option3.Value = True Then
: Picture2.Line (start_x, start_y)-(x, y)
: start_x = x
: start_y = y
: End If
: End If
: End Sub
: Private Sub Picture2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
: If Button = 1 Then
: If Option4.Value = True Then Picture2.Line (start_x, start_y)-(x, y), Picture1.BackColor
: If Option5.Value = True Then Picture2.Line (start_x, start_y)-(x, y), Picture1.BackColor, B
: If Option6.Value = True Then Picture2.Line (start_x, start_y)-(x, y), Picture1.BackColor, BF
: End If
: End Sub
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.172.162.73