怎么没人答呢?
看看好吗?
Private Sub Picture1_Paint()
Picture1.ScaleMode = 0
Picture1.ScaleMode = 3
Picture1.Scale (-1, 20)-(20, -1)
Picture1.DrawWidth = 1
Picture1.Line (0, 0)-(20, 0), vbBlack
Picture1.Line (19.5, 0.07)-(20, 0), vbBlack
Picture1.Line -(19.5, -0.07), vbBlack
Picture1.ForeColor = vbBlack
Picture1.Line (0, 20)-(0, 0), vbBlack
Picture1.Line (0.07, 19.5)-(0, 20), vbBlack
Picture1.Line -(-0.07, 19.5), vbBlack
Picture1.CurrentX = -0.2
Picture1.CurrentY = -0.2
Picture1.Print "O"
For a1 = 0.4 To 18.8 Step 0.4
Picture1.Line (0, a1)-(19, a1), vbBlack
Picture1.Line (a1, 19)-(a1, 0), vbBlack
Next a1
For a = 2 To 18 Step 2
Picture1.DrawWidth = 1.5
Picture1.Line (0, a)-(19, a), vbBlack
Next a
For b = 4 To 16 Step 4
Picture1.DrawWidth = 1.5
Picture1.Line (b, 19)-(b, 0), RGB(0, 0, 0)
Next b
Picture1.DrawWidth = 1.5
Picture1.Line (6.4, 19)-(6.4, 0), RGB(0, 0, 0)
Picture1.Line (17.6, 19)-(17.6, 0), RGB(0, 0, 0)
Picture1.Line (6.4, 6.8)-(8, 8.4), vbRed '线1
Picture1.Line (6.4, 8.4)-(8, 6), vbBlue '线2
'线1与线2的交点是 Label2 = 44%
' 如何能自动获得线1与线2的交点为百分几呢?
Picture1.Line (6.4, 10.8)-(8, 12.4), RGB(0, 225, 225) '线3
Picture1.Line (6.4, 12.4)-(8, 10.8), RGB(225, 225, 0) '线4
'线3与线4的交点是 Label3 = 45%
Picture1.CurrentX = 18.5
Picture1.CurrentY = -0.3
Picture1.ForeColor = vbBlack
Picture1.Print "X"
Picture1.CurrentX = -0.9
Picture1.CurrentY = 19.3
Picture1.ForeColor = vbBlack
Picture1.Print "Y"
End Sub