[VB6 ] 小畫家的橡皮擦寫不出來?

看板Visual_Basic作者 (牛奶瓶/*蛤蜊殺手)時間20年前 (2005/11/06 18:50), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/2 (看更多)
怎麼可能 橡皮擦這功能 我之前試可以 但是 現在 就是不行 鄉民們 幫我看一下 哪邊有錯 謝謝!! 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

11/06 18:51, , 1F
橡皮擦在Option7
11/06 18:51, 1F
文章代碼(AID): #13RT_eAg (Visual_Basic)
文章代碼(AID): #13RT_eAg (Visual_Basic)