VB做温度和时间曲线 要完整代码 原来70 分 继续加

来源:百度知道 编辑:UC知道 时间:2024/05/13 17:10:39
VB做温度和时间曲线 原来70 分 继续加 下面是详细要求
http://zhidao.baidu.com/question/32602593.html

坐标系统:
'定义用于在Picture1上的一个位置打印字符函数
Private Function PrintWord(X, Y, Word As String)
With Pic
.CurrentX = X
.CurrentY = Y
.ForeColor = &HC08080
End With
Pic.Print Word
End Function
'定义画点函数
Private Function DrawDot(ByVal Px As Long, ByVal Py As Long, ByVal color As Long)
Pic.PSet (Px, Py), color
End Function
Public Function xy() '建立直角坐标系
Dim t As Integer
Dim i As Integer
Pic.Cls
Pic.ForeColor = &HFF& '设前景色为红色
Pic.Scale (0, 0)-(640, 480)
Pic.Line (10, 460)-(635, 460), &HC08080 'x轴
Pic.Line (630, 455)-(635, 460), &HC08080
Pic.Line (630, 465)-(635, 460), &HC08080
t = PrintWord(600, 430, "时间")
Pic.Line (10, 10)-(10, 460), &HC08080 'y轴
Pic.Line (5, 15)-(10, 10), &HC08080
Pic.Line (15, 15)-(10, 10), &HC08080
t = PrintWord(15, 10, "速度")
't = PrintWord(15, 440, "坐标原点")
'坐标刻度