-
Notifications
You must be signed in to change notification settings - Fork 4
/
FrmLaporan.frm
327 lines (308 loc) · 9.4 KB
/
FrmLaporan.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
VERSION 5.00
Begin VB.Form FrmLaporan
BackColor = &H0000FF00&
BorderStyle = 0 'None
Caption = "Form3"
ClientHeight = 5640
ClientLeft = 0
ClientTop = 0
ClientWidth = 8205
LinkTopic = "Form3"
Picture = "FrmLaporan.frx":0000
ScaleHeight = 5640
ScaleWidth = 8205
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 390
Left = 80
Picture = "FrmLaporan.frx":0EBB
ScaleHeight = 390
ScaleWidth = 1605
TabIndex = 7
Top = 0
Width = 1605
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 4610
Left = 120
ScaleHeight = 4605
ScaleWidth = 7965
TabIndex = 0
Top = 920
Width = 7970
Begin VB.PictureBox picRuler
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 270
Left = 0
Picture = "FrmLaporan.frx":1510
ScaleHeight = 270
ScaleWidth = 7950
TabIndex = 2
TabStop = 0 'False
Top = 0
Width = 7950
End
Begin VB.TextBox TxtLaporan
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Height = 4360
Left = 0
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 1
Top = 240
Width = 7935
End
End
Begin VB.Label LblTutup
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Close"
ForeColor = &H00000000&
Height = 315
Left = 3840
MouseIcon = "FrmLaporan.frx":B70A
MousePointer = 99 'Custom
TabIndex = 6
Top = 570
Width = 1095
End
Begin VB.Shape Shape5
BackColor = &H000080FF&
BackStyle = 1 'Opaque
BorderColor = &H00000000&
Height = 375
Left = 3840
Shape = 4 'Rounded Rectangle
Top = 480
Width = 1095
End
Begin VB.Image Image8
Height = 480
Left = 7320
Picture = "FrmLaporan.frx":BA14
Top = 360
Width = 480
End
Begin VB.Label LblBuka
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Open"
ForeColor = &H00000000&
Height = 315
Left = 2640
MouseIcon = "FrmLaporan.frx":C2DE
MousePointer = 99 'Custom
TabIndex = 5
Top = 570
Width = 1095
End
Begin VB.Shape Shape3
BackColor = &H000080FF&
BackStyle = 1 'Opaque
BorderColor = &H00000000&
Height = 375
Left = 2640
Shape = 4 'Rounded Rectangle
Top = 480
Width = 1095
End
Begin VB.Label LblSimpan
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Save"
ForeColor = &H00000000&
Height = 315
Left = 1440
MouseIcon = "FrmLaporan.frx":C5E8
MousePointer = 99 'Custom
TabIndex = 4
Top = 570
Width = 1095
End
Begin VB.Shape Shape2
BackColor = &H000080FF&
BackStyle = 1 'Opaque
BorderColor = &H00000000&
Height = 375
Left = 1440
Shape = 4 'Rounded Rectangle
Top = 480
Width = 1095
End
Begin VB.Label LblPrint
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Print"
ForeColor = &H00000000&
Height = 315
Left = 240
MouseIcon = "FrmLaporan.frx":C8F2
MousePointer = 99 'Custom
TabIndex = 3
Top = 570
Width = 1095
End
Begin VB.Shape Shape1
BackColor = &H000080FF&
BackStyle = 1 'Opaque
BorderColor = &H00000000&
Height = 375
Left = 240
Shape = 4 'Rounded Rectangle
Top = 480
Width = 1095
End
End
Attribute VB_Name = "FrmLaporan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'--> avaco Uninstaller 2002
'--> version 1.00
'--> Version Language : English
'--> By Agus Ramadhani
'--> avaco software
'--> http://avaco-software.tripod.com
'--> [email protected]
'--> 2002-2003
'--> Don't forget to Vote :)
Sub LoadText()
Dim fName As String
Dim readln
Dim textload
On Error GoTo ld_err
fName = App.Path & "\temp" & ".tmp"
TxtLaporan.Text = ""
Open App.Path & "\temp" & ".tmp" For Input As #1
Do While Not EOF(1)
Line Input #1, readln
textload = textload + readln + Chr$(13) + Chr$(10)
If Len(textload) >= 500000 Then
MsgBox "This file {" & App.Path & "\temp" & ".tmp" & "} too large for open", vbCritical
GoTo ld_end
End If
Loop
TxtLaporan = textload
ld_err:
Resume ld_end
ld_end:
On Error Resume Next
Close #1
End Sub
Private Sub Form_Load()
Call LoadText
Call LoadText
Kill App.Path & "\temp" & ".tmp"
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Panggil_Fontbold_tipis
End Sub
Private Sub LblBuka_Click()
Dim filename As String
filename = OpenDialog(Me, "Text Files (*.txt)|*.txt|All files (*.*)|*.*", _
"Open", "")
If Len(filename) Then
On Error GoTo ld_err
Dim readln
Dim textload
TxtLaporan.Text = ""
Open filename For Input As #1
Do While Not EOF(1)
Line Input #1, readln
textload = textload + readln + Chr$(13) + Chr$(10)
If Len(textload) >= 30000 Then
MsgBox "This file {" & App.Path & "\temp" & ".tmp" & "} too large for open", vbCritical, "Error !!"
GoTo ld_end
End If
Loop
TxtLaporan = textload
ld_err:
Resume ld_end
ld_end:
On Error Resume Next
Close #1
End If
End Sub
Private Sub LblBuka_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.LblPrint.FontBold = False
Me.LblBuka.FontBold = True
Me.LblSimpan.FontBold = False
Me.LblTutup.FontBold = False
End Sub
Private Sub LblPrint_Click()
On Error GoTo perbaiki:
Printer.Print ""
Printer.FontName = "Arial"
Printer.FontSize = 8
Printer.FontBold = False
Printer.Print Now
Printer.Print ""
Printer.Print Me.TxtLaporan.Text
Printer.EndDoc
Exit Sub
perbaiki:
MsgBox "Error : " & Err.Description & ", Please Check your printer ?", vbCritical, "Print Error !!"
End Sub
Private Sub LblPrint_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.LblPrint.FontBold = True
Me.LblBuka.FontBold = False
Me.LblSimpan.FontBold = False
Me.LblTutup.FontBold = False
End Sub
Private Sub LblSimpan_Click()
Dim filename As String
On Local Error Resume Next
filename = SaveDialog(Me, "Text Files (*.txt)|*.txt", _
"Save", "", "")
If Len(filename) Then
Close #1
Open filename For Output As #1
Print #1, TxtLaporan.Text
Close #1
End If
End Sub
Private Sub LblSimpan_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.LblPrint.FontBold = False
Me.LblBuka.FontBold = False
Me.LblSimpan.FontBold = True
Me.LblTutup.FontBold = False
End Sub
Private Sub LblTutup_Click()
Unload Me
End Sub
Private Sub LblTutup_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.LblPrint.FontBold = False
Me.LblBuka.FontBold = False
Me.LblSimpan.FontBold = False
Me.LblTutup.FontBold = True
End Sub
Sub Panggil_Fontbold_tipis()
Me.LblPrint.FontBold = False
Me.LblBuka.FontBold = False
Me.LblSimpan.FontBold = False
Me.LblTutup.FontBold = False
End Sub
Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub
Private Sub TxtLaporan_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Panggil_Fontbold_tipis
End Sub