If Combo1.Text = "指数函数" Then Picture1.Cls Text1.Text = VScroll1.Value / 10 If Text1.Text = 0 Or Text1.Text < 0 Then MsgBox "A值不能小于等于零" Text1.Text = 0.2 VScroll1.Value = 2 End If For a = -6 To dw Step 1 / 100 Picture1.PSet (a, CSng(Text1.Text ^ a)), vbGreen Next End If 其中a就代表变量x,如过写成a=-dw to dw step 1/100就会出问题了,另外当把text1.text(也就是底数)变成>4.16时也会出现溢出的错误
Picture1.Cls
Text1.Text = VScroll1.Value / 10
If Text1.Text = 0 Or Text1.Text < 0 Then
MsgBox "A值不能小于等于零"
Text1.Text = 0.2
VScroll1.Value = 2
End If
For a = -6 To dw Step 1 / 100
Picture1.PSet (a, CSng(Text1.Text ^ a)), vbGreen
Next
End If
其中a就代表变量x,如过写成a=-dw to dw step 1/100就会出问题了,另外当把text1.text(也就是底数)变成>4.16时也会出现溢出的错误