'给个参考。朋友。窗体上添加:三个文本框,一个命令按钮,一个图片框。
Private Sub Command1_Click()
Dim a(3) As Single
a(1) = Text1
a(2) = Text2
a(3) = Text3
Picture1.Scale (-5, 20)-(20, -5)
Picture1.Line (0, 0)-(20, 0)
Picture1.Line (0, 0)-(0, 20)
Picture1.Line (3, 0)-(5, a(1)), vbRed, BF
Picture1.CurrentX = 3: Picture1.CurrentY = a(1) + 2: Picture1.Print a(1)
Picture1.Line (7, 0)-(9, a(2)), vbRed, BF
Picture1.CurrentX = 7: Picture1.CurrentY = a(2) + 2: Picture1.Print a(2)
Picture1.Line (11, 0)-(13, a(3)), vbRed, BF
Picture1.CurrentX = 11: Picture1.CurrentY = a(3) + 2: Picture1.Print a(3)
End Sub