Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
VERSION 5.00
2
Begin VB.Form inpout32 
3
   Caption         =   "Form1"
4
   ClientHeight    =   4710
5
   ClientLeft      =   915
6
   ClientTop       =   1410
7
   ClientWidth     =   4770
8
   LinkTopic       =   "Form1"
9
   PaletteMode     =   1  'UseZOrder
10
   ScaleHeight     =   4710
11
   ScaleWidth      =   4770
12
   Begin VB.CheckBox Check2 
13
      Caption         =   "Check2"
14
      Height          =   375
15
      Left            =   2640
16
      Style           =   1  'Graphical
17
      TabIndex        =   22
18
      Top             =   2880
19
      Width           =   135
20
   End
21
   Begin VB.CheckBox Check1 
22
      Caption         =   "Check1"
23
      Height          =   375
24
      Left            =   2520
25
      Style           =   1  'Graphical
26
      TabIndex        =   21
27
      Top             =   2880
28
      Width           =   135
29
   End
30
   Begin VB.CommandButton Command11 
31
      Caption         =   "Command11"
32
      Height          =   195
33
      Left            =   4320
34
      TabIndex        =   20
35
      Top             =   2280
36
      Width           =   135
37
   End
38
   Begin VB.CommandButton Command10 
39
      Caption         =   "Command10"
40
      Height          =   195
41
      Left            =   4080
42
      TabIndex        =   19
43
      Top             =   2280
44
      Width           =   135
45
   End
46
   Begin VB.CommandButton Command9 
47
      Caption         =   "Command9"
48
      Height          =   195
49
      Left            =   3840
50
      TabIndex        =   18
51
      Top             =   2280
52
      Width           =   135
53
   End
54
   Begin VB.CommandButton Command8 
55
      Caption         =   "Command8"
56
      Height          =   195
57
      Left            =   3600
58
      TabIndex        =   17
59
      Top             =   2280
60
      Width           =   135
61
   End
62
   Begin VB.CommandButton Command7 
63
      Caption         =   "Command7"
64
      Height          =   195
65
      Left            =   3240
66
      TabIndex        =   16
67
      Top             =   2280
68
      Width           =   135
69
   End
70
   Begin VB.CommandButton Command6 
71
      Caption         =   "Command6"
72
      Height          =   195
73
      Left            =   3000
74
      TabIndex        =   15
75
      Top             =   2280
76
      Width           =   135
77
   End
78
   Begin VB.CommandButton Command5 
79
      Caption         =   "Command5"
80
      Height          =   195
81
      Left            =   2760
82
      TabIndex        =   14
83
      Top             =   2280
84
      Width           =   135
85
   End
86
   Begin VB.CommandButton Command4 
87
      Caption         =   "Command4"
88
      Height          =   195
89
      Left            =   2520
90
      TabIndex        =   13
91
      Top             =   2280
92
      Width           =   135
93
   End
94
   Begin VB.Timer Timer3 
95
      Left            =   3120
96
      Top             =   3960
97
   End
98
   Begin VB.TextBox Text13 
99
      Height          =   285
100
      Left            =   3240
101
      TabIndex        =   8
102
      Text            =   "Text5"
103
      Top             =   1680
104
      Width           =   495
105
   End
106
   Begin VB.TextBox Text12 
107
      Height          =   285
108
      Left            =   3240
109
      TabIndex        =   7
110
      Text            =   "Text4"
111
      Top             =   1200
112
      Width           =   495
113
   End
114
   Begin VB.TextBox Text10 
115
      Height          =   285
116
      Left            =   3240
117
      TabIndex        =   6
118
      Text            =   "Text3"
119
      Top             =   240
120
      Width           =   495
121
   End
122
   Begin VB.TextBox Text11 
123
      Height          =   285
124
      Left            =   3240
125
      TabIndex        =   5
126
      Text            =   "Text2"
127
      Top             =   720
128
      Width           =   495
129
   End
130
   Begin VB.CommandButton Command3 
131
      Caption         =   "Command3"
132
      Height          =   615
133
      Left            =   240
134
      TabIndex        =   4
135
      Top             =   3840
136
      Width           =   2055
137
   End
138
   Begin VB.Timer Timer2 
139
      Left            =   1680
140
      Top             =   120
141
   End
142
   Begin VB.CommandButton Command2 
143
      Caption         =   "Command2"
144
      Height          =   615
145
      Left            =   240
146
      TabIndex        =   3
147
      Top             =   2760
148
      Width           =   2055
149
   End
150
   Begin VB.CommandButton Command1 
151
      Caption         =   "Command1"
152
      Height          =   615
153
      Left            =   240
154
      TabIndex        =   2
155
      Top             =   1680
156
      Width           =   2055
157
   End
158
   Begin VB.Timer Timer1 
159
      Left            =   2400
160
      Top             =   3960
161
   End
162
   Begin VB.TextBox Text1 
163
      Height          =   372
164
      Left            =   960
165
      TabIndex        =   1
166
      Text            =   "Text1"
167
      Top             =   120
168
      Width           =   615
169
   End
170
   Begin VB.CommandButton cmdWriteToPort 
171
      Caption         =   "Write to Port"
172
      Height          =   732
173
      Left            =   240
174
      TabIndex        =   0
175
      Top             =   720
176
      Width           =   1932
177
   End
178
   Begin VB.Label Label13 
179
      Caption         =   "13"
180
      Height          =   375
181
      Left            =   3840
182
      TabIndex        =   12
183
      Top             =   1680
184
      Width           =   375
185
   End
186
   Begin VB.Label Label3 
187
      Caption         =   "12"
188
      Height          =   375
189
      Left            =   3840
190
      TabIndex        =   11
191
      Top             =   1200
192
      Width           =   375
193
   End
194
   Begin VB.Label Label2 
195
      Caption         =   "10"
196
      Height          =   375
197
      Left            =   3840
198
      TabIndex        =   10
199
      Top             =   240
200
      Width           =   375
201
   End
202
   Begin VB.Label Label1 
203
      Caption         =   "11"
204
      Height          =   255
205
      Left            =   3840
206
      TabIndex        =   9
207
      Top             =   720
208
      Width           =   255
209
   End
210
End
211
Attribute VB_Name = "inpout32"
212
Attribute VB_GlobalNameSpace = False
213
Attribute VB_Creatable = False
214
Attribute VB_PredeclaredId = True
215
Attribute VB_Exposed = False
216
Option Explicit
217
Dim Value As Integer
218
Dim PortAddress As Integer
219
Dim stav As Boolean
220
Dim promena As Byte
221
Private Sub cmdWriteToPort_Click()
222
'Write to a port.
223
out Value
224
'Read back and display the result.
225
Value = Value + 1
226
If Value = 255 Then Value = 0
227
End Sub
228
 
229
Private Sub Command1_Click()
230
out 1
231
Timer1.Enabled = True
232
End Sub
233
 
234
Private Sub Command10_Click()
235
out &H40
236
End Sub
237
 
238
Private Sub Command11_Click()
239
out &H80
240
End Sub
241
 
242
Private Sub Command2_Click()
243
out &HFF
244
Timer1.Enabled = True
245
End Sub
246
 
247
Private Sub Command3_Click()
248
out 3
249
Timer1.Enabled = True
250
End Sub
251
 
252
Private Sub Command4_Click()
253
out &H1
254
End Sub
255
 
256
Private Sub Command5_Click()
257
out &H2
258
End Sub
259
 
260
Private Sub Command6_Click()
261
out &H4
262
End Sub
263
 
264
Private Sub Command7_Click()
265
out &H8
266
End Sub
267
 
268
Private Sub Command8_Click()
269
out &H10
270
End Sub
271
 
272
Private Sub Command9_Click()
273
out &H20
274
End Sub
275
Private Sub Form_Load()
276
Timer1.Interval = 1000
277
Timer2.Interval = 10
278
Timer3.Interval = 100
279
End Sub
280
Private Sub Check1_Click()
281
If Check1.Value = 1 Then
282
promena = promena Or &H1
283
Else
284
promena = promena And &HFE
285
End If
286
out promena
287
End Sub
288
 
289
Private Sub Check2_Click()
290
If Check2.Value = 1 Then
291
promena = promena Or &H2
292
Else
293
promena = promena And &HFD
294
End If
295
out promena
296
End Sub
297
 
298
Private Sub Timer1_Timer()
299
out 0
300
Timer1.Enabled = False
301
End Sub
302
 
303
Private Sub Timer2_Timer()
304
'toto se provede kazdych 10ms
305
Text1.Text = inp
306
Text10.Text = inp10
307
Text11.Text = inp11
308
Text12.Text = inp12
309
Text13.Text = inp13
310
If Not inp10 Then
311
Command2_Click
312
End If
313
End Sub
314
 
315
'Private Sub Timer3_Timer()
316
'If stav Then
317
'out 1
318
'stav = False
319
'Else
320
'out 0
321
'stav = True
322
'End If
323
'End Sub