-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPNSELECT.FRM
332 lines (314 loc) · 9.1 KB
/
PNSELECT.FRM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
VERSION 5.00
Begin VB.Form frmSelect
BorderStyle = 3 'Fixed Dialog
Caption = "Imprimir"
ClientHeight = 2655
ClientLeft = 885
ClientTop = 3150
ClientWidth = 6135
Icon = "PnSelect.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2655
ScaleWidth = 6135
ShowInTaskbar = 0 'False
Begin VB.Frame Frame3
Caption = "Copias"
Height = 1320
Left = 3375
TabIndex = 10
Top = 855
Width = 2700
Begin VB.VScrollBar VScroll
Height = 240
Left = 2280
Max = 9999
Min = 1
TabIndex = 14
TabStop = 0 'False
Top = 270
Value = 1
Width = 180
End
Begin VB.TextBox txtCopies
Height = 285
Left = 1770
MaxLength = 4
TabIndex = 4
Text = "1"
Top = 240
Width = 720
End
Begin VB.CheckBox chkCollate
Caption = "C&ollate"
Height = 270
Left = 1770
TabIndex = 5
Top = 735
Width = 810
End
Begin VB.Image imgCollate
Appearance = 0 'Flat
Height = 450
Index = 0
Left = 135
Picture = "PnSelect.frx":000C
Top = 645
Width = 1470
End
Begin VB.Image imgCollate
Appearance = 0 'Flat
Height = 540
Index = 1
Left = 180
Picture = "PnSelect.frx":06A6
Top = 600
Visible = 0 'False
Width = 1365
End
Begin VB.Label lblCopies
Caption = "Numero de &copias:"
Height = 210
Left = 165
TabIndex = 13
Top = 285
Width = 1500
End
End
Begin VB.Frame Frame2
Caption = "Rango Impresion"
Height = 1320
Left = 45
TabIndex = 9
Top = 855
Width = 3240
Begin VB.TextBox txtToPage
Height = 285
Left = 2475
MaxLength = 5
TabIndex = 3
Top = 750
Width = 585
End
Begin VB.TextBox txtFromPage
Height = 285
Left = 1485
MaxLength = 5
TabIndex = 2
Top = 750
Width = 570
End
Begin VB.OptionButton optRange
Caption = "Paginas"
Height = 225
Index = 1
Left = 60
TabIndex = 1
Top = 780
Width = 885
End
Begin VB.OptionButton optRange
Caption = "Todo"
Height = 225
Index = 0
Left = 75
TabIndex = 0
Top = 375
Value = -1 'True
Width = 2835
End
Begin VB.Label lblTo
Caption = "a:"
Height = 210
Left = 2250
TabIndex = 16
Top = 780
Width = 225
End
Begin VB.Label lblFrom
AutoSize = -1 'True
Caption = "desde:"
Height = 195
Left = 990
TabIndex = 15
Top = 795
Width = 480
End
End
Begin VB.Frame Frame1
Caption = "Impresora"
Height = 840
Left = 30
TabIndex = 8
Top = 0
Width = 6045
Begin VB.Label lblPort
Caption = "LPT1:"
Height = 210
Left = 915
TabIndex = 18
Top = 510
Width = 4950
End
Begin VB.Label lblName
Caption = "(Sin Titulo)"
Height = 210
Left = 930
TabIndex = 17
Top = 255
Width = 4935
End
Begin VB.Label Label
Caption = "Donde:"
Height = 210
Index = 1
Left = 135
TabIndex = 12
Top = 510
Width = 600
End
Begin VB.Label Label
Caption = "Nombre:"
Height = 210
Index = 0
Left = 135
TabIndex = 11
Top = 255
Width = 750
End
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancelar"
Height = 345
Left = 4995
TabIndex = 7
Top = 2265
Width = 1080
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 345
Left = 3825
TabIndex = 6
Top = 2265
Width = 1080
End
End
Attribute VB_Name = "frmSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
On Error Resume Next
SetCaption lblName, PD.Name
SetCaption lblPort, PD.Port
If PD.Min > PD.Max Then
Dim i As Integer
i = PD.Min
PD.Min = PD.Max
PD.Max = i
End If
If PD.FromPage < PD.Min Then PD.FromPage = PD.Min
If PD.ToPage > PD.Max Then PD.ToPage = PD.Max
If PD.Min < 1 Or (PD.Max - PD.Min) < 2 Then
PD.RangeAll = True
optRange(0) = True
SetEnabled optRange(1), False
SetEnabled lblFrom, False
SetEnabled txtFromPage, False
SetEnabled lblTo, False
SetEnabled txtToPage, False
Else
PD.RangeAll = False
optRange(1) = True
txtFromPage = PD.FromPage
txtToPage = PD.ToPage
End If
If Not PD.EnableCopies Then
SetEnabled lblCopies, False
SetEnabled txtCopies, False
SetEnabled VScroll, False
SetEnabled chkCollate, False
End If
PD.Copies = 1
PD.Collate = False
PD.Cancelled = False
CentreForm Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
PD.RangeAll = optRange(0)
PD.FromPage = Val(txtFromPage)
PD.ToPage = Val(txtToPage)
PD.Copies = Val(txtCopies)
PD.Collate = (chkCollate = vbChecked)
End Sub
Private Sub cmdCancel_Click()
PD.Cancelled = True
Unload Me
End Sub
Private Sub cmdOK_Click()
PD.Cancelled = False
Unload Me
End Sub
Private Sub optRange_Click(Index As Integer)
On Error Resume Next
If Index = 1 Then
txtFromPage.SetFocus
End If
End Sub
Private Sub txtFromPage_Change()
On Error Resume Next
If Val(txtFromPage) > Val(txtToPage) Then
txtFromPage = txtToPage
ElseIf Val(txtFromPage) < PD.Min Then
txtFromPage = PD.Min
End If
End Sub
Private Sub txtFromPage_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Then
Beep
KeyAscii = 0
End If
End Sub
Private Sub txtToPage_Change()
On Error Resume Next
If Val(txtToPage) < Val(txtFromPage) Then
txtToPage = txtFromPage
ElseIf Val(txtToPage) > PD.Max Then
txtToPage = PD.Max
End If
End Sub
Private Sub txtToPage_KeyPress(KeyAscii As Integer)
If KeyAscii > 57 Then
Beep
KeyAscii = 0
End If
End Sub
Private Sub txtCopies_Change()
On Error Resume Next
If Val(txtCopies) < 1 Then
txtCopies = 1
ElseIf Val(txtCopies) > 9999 Then
txtCopies = 9999
End If
VScroll.Value = Val(txtCopies)
End Sub
Private Sub VScroll_Change()
txtCopies = VScroll.Value
End Sub
Private Sub chkCollate_Click()
If chkCollate = vbChecked Then
SetVisible imgCollate(1), True
SetVisible imgCollate(0), False
Else
SetVisible imgCollate(0), True
SetVisible imgCollate(1), False
End If
End Sub