TiG » 02.11.2004 (Вт) 15:26
вот код этот гениальный кстати )))
Dim x As Single
Dim xx As Single
Dim dxx As Single
Dim g As Single
Private Sub Form_Load()
MSComm1.PortOpen = True
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If x < 360 Then
x = x + 1.73
Else: x = 0
End If
MSComm1.Output = "hgfhgfhg jhfgf jhghjg6576 87687 yyg$HCHDT," & x & ",T*hh<CR><LF>ghfhgfjhgf jkhlkjhjh jkhkjh 7868767"
Text1.Text = MSComm1.Input
p1 = InStr(1, Text1.Text, "T,", vbTextCompare)
If p1 > 0 Then
p2 = InStr(p1, Text1.Text, ",T", vbTextCompare)
End If
If p2 - p1 > 0 Then
Text2.Text = Mid$(Text1.Text, p1 + 2, p2 - p1 - 2)
Else
Text2.Text = ""
End If
End Sub
Private Sub Timer2_Timer()
Text4.Text = Text2.Text
xx = CLng(0 & Text4.Text)
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Timer3_Timer()
Text5.Text = Text2.Text
dxx = CLng(0 & Text5.Text)
g = dxx - xx
Text3.Text = g
Timer3.Enabled = False
Timer2.Enabled = True
End Sub
Все мои игрушки мама разметало ураганом...