Public Function LineCurve(FormCurve As Form, X1 As Double, _
Y1 As Double, X2 As Double, Y2 As Double, X3 As Double, Y3 As Double) Dim CurrentLine as Integer 'In case for some reason there's an error, ignore it On Error Resume Next 'Makes the lines have a width of 1 FormCurve.DrawWidth = 1 'Makes sure the lines stay on the form FormCurve.AutoRedraw = True 'A loop to draw the lines 'Change the 3 to a higher number to get less lines or a lower 'To Get more lines For CurrentLine = 0 To 100 Step 3 'Draws the lines FormCurve.Line (X1 + ((X2 - X1) / 100 * CurrentLine), Y1 + _ ((Y2 - Y1) / 100 * CurrentLine))-(X2 - ((X2 - X3) / 100 * _ CurrentLine), Y2 - ((Y2 - Y3) / 100 * CurrentLine)) Next CurrentLine end function Private Sub Form_Load() 'Makes the first point the top left of the form 'The second point is at the bottom left 'The third is at the bottom right LineCurve Form1, 0, 0, 0, Form1.ScaleHeight, Form1.ScaleWidth, _ Form1.ScaleHeight End Sub Inputs: A Form: formcurve 3 Points: Point1: X1, Y1 Point2: X2, Y2 Point3: X3, Y3 |