VB的picturebox怎么画函数图像y=x^2+2*x啊,

问题描述:

VB的picturebox怎么画函数图像y=x^2+2*x啊,
1个回答 分类:综合 2014-12-14

问题解答:

我来补答
Private Sub Command1_Click()
Dim x As Integer
Dim y As Double
Dim startX As Integer
Dim startY As Double
Dim nextX As Integer
Dim nextY As Double
startX = 0
startY = 0
For x = 0 To 100
y = x * x + 2 * x
nextX = x
nextY = Form1.Height - y
Form1.Line (startX,startY)-(nextX,nextY)
startX = nextX
startY = nextY
Next
End Sub
我在窗体上画线,没在picturebox画,改成picturebox就行了
 
 
展开全文阅读
剩余:2000