7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form_Load()
Dim x1, y1, x2, y2, x, y As Double
Form1.Show
Form1.Width = Form1.Height
Form1.AutoRedraw = True
Form1.DrawWidth = 2
Form1.Scale (0, 0)-(50, 50)
x1 = 1: y1 = 1: x2 = 40: y2 = 45
Line (x1, y1)-(x2, y2)
x = 2
Y3 = ((x2 - x1) * (2 * x - x1 - x2)) / (2 * y1 - 2 * y2) + (y1 + y2) / 2
Debug.Print Y3
x = 50
y4 = ((x2 - x1) * (2 * x - x1 - x2)) / (2 * y1 - 2 * y2) + (y1 + y2) / 2
Line (0, Y3)-(50, y4)
End Sub