vb是一个什么电脑软件,它有什么用途

来源:百度知道 编辑:UC知道 时间:2024/06/28 05:37:31

它是一个编程的软件。自己编点什么都没有问题的。给你一些代码看看能编出什么~~~

Option Explicit

Sub fill_color(x, y)
If Picture1.Point(x, y) = RGB(0, 0, 0) Then
Picture1.Line (x - 0.5, y + 0.5)-(x + 0.5, y - 0.5), RGB(250, 250, 250), BF
Else
Picture1.Line (x - 0.5, y + 0.5)-(x + 0.5, y - 0.5), RGB(0, 0, 0), BF
End If
End Sub

Private Sub Form_Load()
Picture1.Scale (0, 12)-(12, 0)
End Sub

Private Sub Form_Resize()
Dim i As Integer

For i = 1 To 11
Picture1.Line (1, i)-(11, i)
Picture1.Line (i, 1)-(i, 11)
Next i
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Int(x) >= 1 And Int(x) < 11 And Int(y) >= 1 And Int(y) < 11 Then
fill_color Int(x) + 0.5, Int(y) + 0.5
If Int(y) + 1 <= 10 Then fill_color Int(x) + 0.5, Int(y) + 1.5
If