用vb制作一个简单画板,要求很简单
发布网友
发布时间:2022-06-22 01:20
我来回答
共1个回答
热心网友
时间:2022-06-22 02:49
Dim yanse
Dim xiankuan
Private Sub Command2_Click()
Picture1.Cls
End Sub
Private Sub Command3_Click()
SavePicture Picture1.Image, App.Path & "\aa.bmp"
End Sub
Private Sub Form_Load()
xiankuan = 50
End Sub
Private Sub Command1_Click(Index As Integer)
yanse = Command1(Index).BackColor
End Sub
Private Sub Option1_Click(Index As Integer)
xiankuan = 50
Select Case Index
Case 0
k = 1
Case 1
k = 3
Case 2
k = 5
Case 3
k = 8
Case 4
k = 10
Case 5
k = 15
End Select
xiankuan = xiankuan * k
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
a = X
b = Y
Picture1.Line (a, b)-(X + xiankuan, Y + xiankuan), yanse, BF
a = X
b = Y
End If
End Sub