加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

用vb制作简单的画板

发布时间:2020-12-16 23:51:25 所属栏目:大数据 来源:网络整理
导读:Private Sub Form_Load() Picture1.DrawWidth = HScroll1.Value End Sub Private Sub HScroll1_Change() Picture1.DrawWidth = HScroll1.Value End Sub Private Sub Label0_Click(Index As Integer) If Index = 4 Then Form2.Show Else Picture1.ForeColor =

Private Sub Form_Load()
Picture1.DrawWidth = HScroll1.Value
End Sub

Private Sub HScroll1_Change()
Picture1.DrawWidth = HScroll1.Value
End Sub

Private Sub Label0_Click(Index As Integer)
If Index = 4 Then
Form2.Show
Else
Picture1.ForeColor = Label0(Index).BackColor
End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
If Button = 1 Then Picture1.PSet (X,Y)
End Sub

Private Sub Command1_Click()
Form2.Hide
Form1.Picture1.ForeColor = Shape1.FillColor

End Sub

Private Sub Form_Load()

End Sub

Private Sub HScroll1_Change(Index As Integer)
Dim r As Integer,b As Integer,g As Integer
r = HScroll1(0).Value
g = HScroll1(1).Value
b = HScroll1(2).Value
Shape1.FillColor = RGB(r,g,b)

End Sub

Private Sub HScroll1_Scroll(Index As Integer)Call HScroll1_Change(Index)End Sub

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读