frmPageSetup.frm
9.61 KB
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
VERSION 5.00
Begin VB.Form frmPageSetup
BorderStyle = 3 'Fixed Dialog
Caption = "Configurar Página"
ClientHeight = 4710
ClientLeft = 45
ClientTop = 330
ClientWidth = 6915
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4710
ScaleWidth = 6915
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdCancel
Caption = "Cancelar"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 5685
TabIndex = 22
Top = 4125
Width = 1050
End
Begin VB.CommandButton cmdOK
Caption = "&OK"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4575
TabIndex = 21
Top = 4125
Width = 1050
End
Begin VB.Frame Frame4
Caption = "Margem"
Height = 1515
Left = 3030
TabIndex = 12
Top = 2415
Width = 3720
Begin VB.TextBox Text4
BackColor = &H8000000F&
Enabled = 0 'False
Height = 360
Left = 2715
TabIndex = 19
Text = "0.75"
Top = 885
Width = 795
End
Begin VB.TextBox Text3
BackColor = &H8000000F&
Enabled = 0 'False
Height = 360
Left = 810
TabIndex = 17
Text = "0.75"
Top = 900
Width = 795
End
Begin VB.TextBox Text2
BackColor = &H8000000F&
Enabled = 0 'False
Height = 360
Left = 2715
TabIndex = 15
Text = "0.75"
Top = 315
Width = 795
End
Begin VB.TextBox Text1
BackColor = &H8000000F&
Enabled = 0 'False
Height = 360
Left = 810
TabIndex = 13
Text = "0.75"
Top = 330
Width = 795
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Abaixo"
Height = 195
Left = 2130
TabIndex = 20
Top = 960
Width = 480
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Topo"
Height = 195
Left = 135
TabIndex = 18
Top = 975
Width = 375
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Direita"
Height = 195
Left = 2130
TabIndex = 16
Top = 390
Width = 450
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Esqerda"
Height = 195
Left = 135
TabIndex = 14
Top = 405
Width = 585
End
End
Begin VB.Frame fraOrientation
Caption = "Orientação"
Height = 1515
Left = 150
TabIndex = 7
Top = 2415
Width = 2715
Begin VB.OptionButton opPortrait
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 780
Left = 120
Picture = "frmPageSetup.frx":0000
Style = 1 'Graphical
TabIndex = 9
Top = 255
Value = -1 'True
Width = 990
End
Begin VB.OptionButton opLandscape
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 795
Left = 1440
Picture = "frmPageSetup.frx":274E
Style = 1 'Graphical
TabIndex = 8
Top = 240
Width = 1050
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Paisagem"
Height = 195
Left = 1590
TabIndex = 11
Top = 1140
Width = 690
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Retrato"
Height = 195
Left = 315
TabIndex = 10
Top = 1110
Width = 525
End
End
Begin VB.Frame Frame3
Caption = "Visualização"
Height = 2055
Left = 4470
TabIndex = 3
Top = 180
Width = 2295
Begin VB.Image imgPortrait
Height = 1470
Left = 600
Picture = "frmPageSetup.frx":5034
Top = 360
Width = 1050
End
Begin VB.Image imgLandScape
Height = 1080
Left = 360
Picture = "frmPageSetup.frx":A19E
Top = 600
Visible = 0 'False
Width = 1530
End
End
Begin VB.Frame Frame2
Caption = "Customizado"
Height = 735
Left = 150
TabIndex = 2
Top = 1515
Width = 3975
End
Begin VB.Frame Frame1
Caption = "Papel"
Height = 1170
Left = 150
TabIndex = 0
Top = 195
Width = 3975
Begin VB.ComboBox cmbSource
BackColor = &H8000000F&
Enabled = 0 'False
Height = 315
ItemData = "frmPageSetup.frx":F880
Left = 945
List = "frmPageSetup.frx":F882
TabIndex = 5
Top = 720
Width = 2790
End
Begin VB.ComboBox cmbPageSize
Height = 315
ItemData = "frmPageSetup.frx":F884
Left = 945
List = "frmPageSetup.frx":F89D
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 2790
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Seleção"
Height = 195
Left = 120
TabIndex = 6
Top = 750
Width = 585
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Tamanho"
Height = 195
Left = 120
TabIndex = 4
Top = 270
Width = 675
End
End
End
Attribute VB_Name = "frmPageSetup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private orientation As Boolean
Private pageSize As Integer
Private isOK As Boolean
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
orientation = opPortrait.value
pageSize = cmbPageSize.ListIndex
isOK = True
Unload Me
End Sub
Private Sub Form_Load()
cmbPageSize.ListIndex = 0
isOK = False
End Sub
Private Sub opLandscape_Click()
imgLandScape.Visible = True
imgPortrait.Visible = False
End Sub
Private Sub opPortrait_Click()
imgLandScape.Visible = False
imgPortrait.Visible = True
End Sub
Public Function getOrientation() As Boolean
getOrientation = orientation
End Function
Public Sub setOrientation(value As Boolean)
opPortrait.value = value
opLandscape.value = Not value
End Sub
Public Function getPageSize() As Integer
getPageSize = pageSize
End Function
Public Sub setPageSize(value As Integer)
cmbPageSize.ListIndex = value
End Sub
Function getOK() As Boolean
getOK = isOK
End Function