Go to most recent revision | Blame | Last modification | View Log | Download
VERSION 5.00
Begin VB.Form inpout32
Caption = "Form1"
ClientHeight = 4710
ClientLeft = 915
ClientTop = 1410
ClientWidth = 4770
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 4710
ScaleWidth = 4770
Begin VB.Timer TimerY
Left = 1680
Top = 600
End
Begin VB.TextBox TextY
Height = 375
Left = 960
TabIndex = 1
Text = "Y"
Top = 600
Width = 615
End
Begin VB.Timer TimerX
Left = 1680
Top = 120
End
Begin VB.TextBox TextX
Height = 372
Left = 960
TabIndex = 0
Text = "X"
Top = 120
Width = 615
End
End
Attribute VB_Name = "inpout32"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim pocitadlo
Private Sub Form_Load()
TimerX.Interval = 500
TimerX.Enabled = True
TimerY.Interval = 500
TimerY.Enabled = True
End Sub
Private Sub TimerX_Timer()
Dim vstup
Output &H201, &HFF
For n = 1 To 1000
pocitadlo = n
vstup = Input32(&H201) And 1
If vstup = 0 Then
GoTo ven
End If
Next n
ven:
TextX.Text = pocitadlo
End Sub
Private Sub TimerY_Timer()
Dim vstup
Output &H201, &HFF
For n = 1 To 1000
pocitadlo = n
vstup = Input32(&H201) And 2
If vstup = 0 Then
GoTo ven
End If
Next n
ven:
TextY.Text = pocitadlo
End Sub