Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 5 → Rev 6

/programy/VB/work/1st_program/inpout32.frm
0,0 → 1,323
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.CheckBox Check2
Caption = "Check2"
Height = 375
Left = 2640
Style = 1 'Graphical
TabIndex = 22
Top = 2880
Width = 135
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 375
Left = 2520
Style = 1 'Graphical
TabIndex = 21
Top = 2880
Width = 135
End
Begin VB.CommandButton Command11
Caption = "Command11"
Height = 195
Left = 4320
TabIndex = 20
Top = 2280
Width = 135
End
Begin VB.CommandButton Command10
Caption = "Command10"
Height = 195
Left = 4080
TabIndex = 19
Top = 2280
Width = 135
End
Begin VB.CommandButton Command9
Caption = "Command9"
Height = 195
Left = 3840
TabIndex = 18
Top = 2280
Width = 135
End
Begin VB.CommandButton Command8
Caption = "Command8"
Height = 195
Left = 3600
TabIndex = 17
Top = 2280
Width = 135
End
Begin VB.CommandButton Command7
Caption = "Command7"
Height = 195
Left = 3240
TabIndex = 16
Top = 2280
Width = 135
End
Begin VB.CommandButton Command6
Caption = "Command6"
Height = 195
Left = 3000
TabIndex = 15
Top = 2280
Width = 135
End
Begin VB.CommandButton Command5
Caption = "Command5"
Height = 195
Left = 2760
TabIndex = 14
Top = 2280
Width = 135
End
Begin VB.CommandButton Command4
Caption = "Command4"
Height = 195
Left = 2520
TabIndex = 13
Top = 2280
Width = 135
End
Begin VB.Timer Timer3
Left = 3120
Top = 3960
End
Begin VB.TextBox Text13
Height = 285
Left = 3240
TabIndex = 8
Text = "Text5"
Top = 1680
Width = 495
End
Begin VB.TextBox Text12
Height = 285
Left = 3240
TabIndex = 7
Text = "Text4"
Top = 1200
Width = 495
End
Begin VB.TextBox Text10
Height = 285
Left = 3240
TabIndex = 6
Text = "Text3"
Top = 240
Width = 495
End
Begin VB.TextBox Text11
Height = 285
Left = 3240
TabIndex = 5
Text = "Text2"
Top = 720
Width = 495
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 615
Left = 240
TabIndex = 4
Top = 3840
Width = 2055
End
Begin VB.Timer Timer2
Left = 1680
Top = 120
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 615
Left = 240
TabIndex = 3
Top = 2760
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 240
TabIndex = 2
Top = 1680
Width = 2055
End
Begin VB.Timer Timer1
Left = 2400
Top = 3960
End
Begin VB.TextBox Text1
Height = 372
Left = 960
TabIndex = 1
Text = "Text1"
Top = 120
Width = 615
End
Begin VB.CommandButton cmdWriteToPort
Caption = "Write to Port"
Height = 732
Left = 240
TabIndex = 0
Top = 720
Width = 1932
End
Begin VB.Label Label13
Caption = "13"
Height = 375
Left = 3840
TabIndex = 12
Top = 1680
Width = 375
End
Begin VB.Label Label3
Caption = "12"
Height = 375
Left = 3840
TabIndex = 11
Top = 1200
Width = 375
End
Begin VB.Label Label2
Caption = "10"
Height = 375
Left = 3840
TabIndex = 10
Top = 240
Width = 375
End
Begin VB.Label Label1
Caption = "11"
Height = 255
Left = 3840
TabIndex = 9
Top = 720
Width = 255
End
End
Attribute VB_Name = "inpout32"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Value As Integer
Dim PortAddress As Integer
Dim stav As Boolean
Dim promena As Byte
Private Sub cmdWriteToPort_Click()
'Write to a port.
out Value
'Read back and display the result.
Value = Value + 1
If Value = 255 Then Value = 0
End Sub
 
Private Sub Command1_Click()
out 1
Timer1.Enabled = True
End Sub
 
Private Sub Command10_Click()
out &H40
End Sub
 
Private Sub Command11_Click()
out &H80
End Sub
 
Private Sub Command2_Click()
out &HFF
Timer1.Enabled = True
End Sub
 
Private Sub Command3_Click()
out 3
Timer1.Enabled = True
End Sub
 
Private Sub Command4_Click()
out &H1
End Sub
 
Private Sub Command5_Click()
out &H2
End Sub
 
Private Sub Command6_Click()
out &H4
End Sub
 
Private Sub Command7_Click()
out &H8
End Sub
 
Private Sub Command8_Click()
out &H10
End Sub
 
Private Sub Command9_Click()
out &H20
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer2.Interval = 10
Timer3.Interval = 100
End Sub
Private Sub Check1_Click()
If Check1.Value = 1 Then
promena = promena Or &H1
Else
promena = promena And &HFE
End If
out promena
End Sub
 
Private Sub Check2_Click()
If Check2.Value = 1 Then
promena = promena Or &H2
Else
promena = promena And &HFD
End If
out promena
End Sub
 
Private Sub Timer1_Timer()
out 0
Timer1.Enabled = False
End Sub
 
Private Sub Timer2_Timer()
'toto se provede kazdych 10ms
Text1.Text = inp
Text10.Text = inp10
Text11.Text = inp11
Text12.Text = inp12
Text13.Text = inp13
If Not inp10 Then
Command2_Click
End If
End Sub
 
'Private Sub Timer3_Timer()
'If stav Then
'out 1
'stav = False
'Else
'out 0
'stav = True
'End If
'End Sub