我先一部分代码给你
核心部分给我发E-mail:wgb2133006@163.com
Const Pi = 3.1415926535 '定义圆周率
Dim b As Integer
Dim c As Integer
Dim wor, a, h
Dim i, j As Double
Dim k As Single
Dim v, n, m, g As Double
Private Sub Command3_Click()
SavePicture Picture1.Picture, "c:\1.bmp" '保存图像框内容
End Sub
Private Sub Command4_Click()
Form2.Show
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Show
Me.AutoRedraw = True
Picture1.AutoRedraw = True
XY
End Sub
Static Function Loge(X)
Loge = Log(X) / Log(Exp(1))
End Function
'定义用于在Picture1上的一个位置打印字符函数
Private Function PrintWord(X, Y, Word As String)
With Picture1
.CurrentX = X
.CurrentY = Y
.ForeColor = RGB(0, 0, 255)
End With
Picture1.Print Word
End Function
Private Function DrawDot(Px, Py, Color)
Picture1.PSet (Px, Py), Color
End Function
Sub XY() '建立直角坐标系
Picture1.DrawWidth = 1 '设置线条宽度
Picture1.Cls
'设定用户坐标系,坐标原点在Picture1中心
Picture1.Scale (-10, 10)-(10, -10)
Picture1.Line (-10, 0)-(10, 0), RGB(0, 0, 255)
Picture1.Line -(9.5, 0.5), RGB(0, 0, 255)
Picture1.Line (10, 0)-(9.5, -0.5), RGB(0, 0, 255)
Picture1.ForeColor = RGB(0, 0, 255)
Picture1.Print "X"
'画 X 轴
Picture1.Line (0, -10)-(0, 10), RGB(0, 0, 255)
Picture1.Line -(0.5, 9.5), RGB(0, 0, 255)
Picture1.Line (0, 10)-(-0.5, 9.5), RGB(0, 0, 255)
Picture1.Print "Y"
'画 Y 轴
For lin = -9 To 9
Picture1.Line (lin, 0)-(lin, 0.25)
wor = PrintWord(lin - 0.5, -0.5, Str(lin))
Picture1.Line (0, lin)-(-0.25, lin)
If lin <> 0 Then
wor = PrintWord(-0.9, lin, Str(lin))
End If
Next lin
Picture1.DrawWidth = 2
End Sub
Y=val(文本框)X^2+val(文本框)X+val(文本框)
把字符串变成数字
剩下的 也差不多
“比例” 什么意思?