你好,看到你懂VB,能否请教一下,如何将TXT文本中的数据导入已经建好的坐标系中显示出来?谢谢了
TXT中的坐标分布这样1,22,33,5.........坐标系是通过这段代码生成的PrivateSubForm_Resize()ClsForm1.Scale(-11,1...
TXT中的坐标分布这样
1,2
2,3
3,5.........
坐标系是通过这段代码生成的
Private Sub Form_Resize()
Cls
Form1.Scale (-11, 11)-(11, -11) ' 定义坐标系
Line (-11, 0)-(11, 0): Line (0, 11)-(0, -11) ' 画X轴与Y轴
CurrentX = 10.5: CurrentY = 0: Print "X轴"
CurrentX = 0: CurrentY = 11: Print "Y轴"
For i = -10 To 10 Step 2 ' 在X轴上标记坐标刻度
If i <> 0 Then
CurrentX = i: CurrentY = 0.2: Line -(i, 0)
CurrentX = i - 0.5: CurrentY = -0.5: Print i '分刻度
Else
CurrentX = -0.3: CurrentY = -0.5: Print 0 '坐标原点
End If
Next i
For i = -10 To 10 Step 2 ' 在Y轴上标记坐标刻度
If i <> 0 Then
CurrentX = -1.5: CurrentY = i + 0.5: Print i
CurrentX = 0.2: CurrentY = i: Line -(0, i) '分刻度
End If
Next i
End Sub 展开
1,2
2,3
3,5.........
坐标系是通过这段代码生成的
Private Sub Form_Resize()
Cls
Form1.Scale (-11, 11)-(11, -11) ' 定义坐标系
Line (-11, 0)-(11, 0): Line (0, 11)-(0, -11) ' 画X轴与Y轴
CurrentX = 10.5: CurrentY = 0: Print "X轴"
CurrentX = 0: CurrentY = 11: Print "Y轴"
For i = -10 To 10 Step 2 ' 在X轴上标记坐标刻度
If i <> 0 Then
CurrentX = i: CurrentY = 0.2: Line -(i, 0)
CurrentX = i - 0.5: CurrentY = -0.5: Print i '分刻度
Else
CurrentX = -0.3: CurrentY = -0.5: Print 0 '坐标原点
End If
Next i
For i = -10 To 10 Step 2 ' 在Y轴上标记坐标刻度
If i <> 0 Then
CurrentX = -1.5: CurrentY = i + 0.5: Print i
CurrentX = 0.2: CurrentY = i: Line -(0, i) '分刻度
End If
Next i
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询