请高手帮我看看这段代码
Option ExplicitDim DataFromCom As Integer '从串口读过来的实时值Dim DataFromComLast As Integer '上次的串口值Dim TimeCount As IntegerPrivate ap() As String '窗体收放比例数组Private Sub Form_Load()PicScale Pic '调整图像框的坐标系PicMidleLine Pic '在图像框中画一条中线End SubPrivate Sub PicScale(picX As PictureBox) '调整图像框的坐标系Pic.Scale (0, 1000)-(1000, -1000)End SubPrivate Sub PicMidleLine(picX As PictureBox) '在图像框中画一条中线picX.Line (0, 0)-(1000, 0), vbGreen '画出中线End SubPrivate Sub DrawRealLine(picX As PictureBox, TimeCountX As Integer, DataFromComX As Integer, DataFromComLastX As Integer)If TimeCountX - 1 > 0 ThenpicX.Line ((TimeCountX - 1) * 10, DataFromComLastX)-(TimeCountX * 10, DataFromComX), vbWhiteEnd IfEnd SubPrivate Sub Timer1_Timer()DataFromComLast = DataFromComRandomizeDataFromCom = 1000 * RndTimeCount = TimeCount + 1DrawRealLine Pic, TimeCount, DataFromCom, DataFromComLast '画出实时的曲线End SubPublic Sub ai() '窗体的收放Dim i As IntegerOn Error Resume NextIf Controls.Count > 0 Then '如果窗体中包括菜单,这时程序将出错 '解决办法:在代码前加"On Error Resume Next For i = 0 To Controls.Count - 1 With ap(i) .wp = Me.Controls(i).Width / Me.ScaleWidth .hp = Me.Controls(i).Height / Me.ScaleHeight .lp = Me.Controls(i).Left / Me.ScaleWidth .tp = Me.Controls(i).Top / Me.ScaleHeight End With Next iEnd IfEnd Sub