如何设置vb坐标,并使坐标随着函数的X,Y最值的变化而变化
我想得到图片(1)的效果,麻烦你看看我源代码需要怎么修改。谢谢PrivateSubCommand1_Click()td=Val(Text1.Text)h=Val(Text...
我想得到图片(1)的效果,麻烦你看看我源代码需要怎么修改。谢谢
Private Sub Command1_Click()
td = Val(Text1.Text)
h = Val(Text2.Text)
Picture1.Cls
Picture1.ScaleMode = 0
Picture1.ScaleMode = 1
Picture1.Scale (-5, td * h)-(h, -5)
'绘坐标系的X轴及箭头线
Picture1.Line (0, 0)-(td * h, 0), vbBlue
Picture1.ForeColor = vbBlue
Picture1.CurrentX = 10
Picture1.CurrentY = -2
Picture1.Print "t/oC"
For j = 5 To td * h Step 10
Picture1.CurrentX = j
Picture1.CurrentY = -0.5
Picture1.Print j
Next j
'绘坐标系的Y轴及箭头线
Picture1.Line (0, 0)-(0, h), vbBlue
Picture1.ForeColor = vbBlue
Picture1.CurrentX = -4
Picture1.CurrentY = 10
Picture1.Print "H/m"
For k = 50 To h Step 50
Picture1.CurrentX = -3
Picture1.CurrentY = k
Picture1.Print k
Next k
vb截图 展开
Private Sub Command1_Click()
td = Val(Text1.Text)
h = Val(Text2.Text)
Picture1.Cls
Picture1.ScaleMode = 0
Picture1.ScaleMode = 1
Picture1.Scale (-5, td * h)-(h, -5)
'绘坐标系的X轴及箭头线
Picture1.Line (0, 0)-(td * h, 0), vbBlue
Picture1.ForeColor = vbBlue
Picture1.CurrentX = 10
Picture1.CurrentY = -2
Picture1.Print "t/oC"
For j = 5 To td * h Step 10
Picture1.CurrentX = j
Picture1.CurrentY = -0.5
Picture1.Print j
Next j
'绘坐标系的Y轴及箭头线
Picture1.Line (0, 0)-(0, h), vbBlue
Picture1.ForeColor = vbBlue
Picture1.CurrentX = -4
Picture1.CurrentY = 10
Picture1.Print "H/m"
For k = 50 To h Step 50
Picture1.CurrentX = -3
Picture1.CurrentY = k
Picture1.Print k
Next k
vb截图 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询