南昌航空大学
Picture1.Line (xmin - 0.2 * (xmax - xmin), ymax)-(xmax + 0.2 * (xmax - xmin), ymin), vbBlue Else
Picture1.Scale (xmin - 0.2 * (xmax - xmin), ymax + 0.2 * (ymax - ymin))-(xmax + 0.2 * (xmax - xmin), ymin - 0.2 * (ymax - ymin))
zbz xmin - 0.2 * (xmax - xmin), ymax + 0.2 * (ymax - ymin), xmax + 0.2 * (xmax - xmin), ymin - 0.2 * (ymax - ymin)
Picture1.Line (xmin - 0.2 * (xmax - xmin), b * (xmin - 0.2 * (xmax - xmin)) + a)-(xmax + 0.2 * (xmax - xmin), b * (xmax + 0.2 * (xmax - xmin)) + a), vbBlue End If End Sub
Private Sub Command4_Click() Text1.Text = \ Picture1.Cls Picture2.Cls
Command1.Enabled = True Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False End Sub
Private Sub Command5_Click() End End Sub
Private Sub Form_Activate()
Dim s As Integer, l As Single Dim p1 As Single, p2 As Single p1 = ScaleWidth: p2 = ScaleHeight l = 255 / p1 For s = 0 To p1
Line (s, 0)-(s, p2), RGB(255 - s * l, 255 - s * l, 255 - s * l) Next s End Sub
Private Sub Form_Load()
Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Picture1.AutoRedraw = True End Sub
Function zbz(ByVal x1 As Single, y1 As Single, x2 As Single, y2 As Single) For i = x1 + (x2 - x1) / 5 To x2 Step (x2 - x1) / 5
Picture1.Line (i, y2 + 100 * (y1 - y2) / Picture1.Height)-(i, y2) Picture1.CurrentX = i - 250 * (x2 - x1) / Picture1.Width
第 16 页 共 17 页
南昌航空大学
Picture1.CurrentY = y2 + 350 * (y1 - y2) / Picture1.Height Picture1.Print i Next
For i = y2 + (y1 - y2) / 5 To y1 Step (y1 - y2) / 5
Picture1.Line (x1, i)-(x1 + 100 * (x2 - x1) / Picture1.Width, i) Picture1.CurrentX = x1 + 150 * (x2 - x1) / Picture1.Width Picture1.CurrentY = i + 80 * (y1 - y2) / Picture1.Height Picture1.Print i Next
End Function
第 17 页 共 17 页