用VB-Picture画图,就是画不出点来,请高手指点。
代码如下:PrivateSubndqx1_Click()ndqx.ShowDimiAsDoubleDimtAsDoubleDimt1AsDoubleDimxAsDoubl...
代码如下:
Private Sub ndqx1_Click()
ndqx.Show
Dim i As Double
Dim t As Double
Dim t1 As Double
Dim x As Double
Dim nd1 As Double
Dim e As Double
e = Log(10)
ndqx.Picture1.ScaleMode = 1
ndqx.Picture1.DrawWidth = 1
ndqx.Picture1.Scale (0, 0)-(5, 6000)
'标x轴刻度
For i = 0 To 5 Step 0.25
ndqx.Picture1.CurrentX = i
ndqx.Picture1.CurrentY = 100
ndqx.Picture1.Print i
Next i
'标y轴刻度
For i = 0 To 6000 Step 500
ndqx.Picture1.CurrentX = 0.1
ndqx.Picture1.CurrentY = i
ndqx.Picture1.Print i
Next i
For i = 0 To 6000 Step 500
ndqx.Picture1.Line (0, i)-(5, i)
Next i
For i = 0 To 5 Step 0.25
ndqx.Picture1.Line (i, 0)-(i, 6000)
Next i
For l = 0 To l = psbs - 10 Step 10
t = wendu(l)
t1 = wendu(psbs)
x = (t - t1) / 10
nd1 = 2 * pcynd1 * 1000 * 0.5 ^ x
nd1 = Log(nd1) / e
ndqx.Picture1.PSet (nd1, l), RGB(255, 0, 0)
Next l
For l = psbs To l = h Step 10
t = wendu(l)
x = (t - 50) / 10
nd1 = yynd * 0.5 ^ x
nd1 = Log(nd1) / e
ndqx.Picture1.PSet (nd1, l), RGB(255, 0, 0)
Next l
End Sub
ndqx是窗体,ndqx1是菜单名。 展开
Private Sub ndqx1_Click()
ndqx.Show
Dim i As Double
Dim t As Double
Dim t1 As Double
Dim x As Double
Dim nd1 As Double
Dim e As Double
e = Log(10)
ndqx.Picture1.ScaleMode = 1
ndqx.Picture1.DrawWidth = 1
ndqx.Picture1.Scale (0, 0)-(5, 6000)
'标x轴刻度
For i = 0 To 5 Step 0.25
ndqx.Picture1.CurrentX = i
ndqx.Picture1.CurrentY = 100
ndqx.Picture1.Print i
Next i
'标y轴刻度
For i = 0 To 6000 Step 500
ndqx.Picture1.CurrentX = 0.1
ndqx.Picture1.CurrentY = i
ndqx.Picture1.Print i
Next i
For i = 0 To 6000 Step 500
ndqx.Picture1.Line (0, i)-(5, i)
Next i
For i = 0 To 5 Step 0.25
ndqx.Picture1.Line (i, 0)-(i, 6000)
Next i
For l = 0 To l = psbs - 10 Step 10
t = wendu(l)
t1 = wendu(psbs)
x = (t - t1) / 10
nd1 = 2 * pcynd1 * 1000 * 0.5 ^ x
nd1 = Log(nd1) / e
ndqx.Picture1.PSet (nd1, l), RGB(255, 0, 0)
Next l
For l = psbs To l = h Step 10
t = wendu(l)
x = (t - 50) / 10
nd1 = yynd * 0.5 ^ x
nd1 = Log(nd1) / e
ndqx.Picture1.PSet (nd1, l), RGB(255, 0, 0)
Next l
End Sub
ndqx是窗体,ndqx1是菜单名。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询