-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModule2.bas
344 lines (339 loc) · 8.15 KB
/
Module2.bas
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
333
334
335
336
337
338
339
340
341
342
343
344
Attribute VB_Name = "Module2"
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public starttime As Date
Public OutputDir As String
Public selP As String
Public NumOfHi As Integer, OpenFN As Integer
Public InpWord As String '“系统温馨提示”公有变量
Public Rtb As Integer
Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Public DU_FoN As String, DU_IconP As String
Public Const Tw = 3855
Sub Main()
''''
Load Form10
DoEvents
Form10.Label1.Width = 0 * Tw
Form10.Show
DoEvents
Sleep (35)
DoEvents
Form10.Label1.Width = 0.03 * Tw
For a11 = 0.03 To 0.09 Step 0.005
Sleep (5)
DoEvents
Form10.Label1.Width = a11 * Tw
DoEvents
Next
Form10.Label1.Width = 0.09 * Tw
DoEvents
Sleep (94)
DoEvents
Form10.Label1.Width = 0.175 * Tw
DoEvents
For qwera = 0.09 To 0.175 Step 0.009
DoEvents
Sleep (7)
DoEvents
Form10.Label1.Width = qwera * Tw
DoEvents
Next
Dim RealCom As String
If Left(Command(), 1) = Chr(34) Then
RealCom = Mid(Command(), 2, Len(Command()) - 2)
Else
RealCom = Command()
End If
DoEvents
Form10.Label1.Width = 0.25 * Tw
Load Form1
Load Form2
Load Form9
DoEvents
Sleep (115)
DoEvents
DoEvents
Form10.Label1.Width = 0.335 * Tw
DoEvents
Sleep (120)
DoEvents
If Dir(App.Path & "\DyEncGUI5.0.config") <> "" Then
On Error Resume Next
Open App.Path & "\DyEncGUI5.0.config" For Input As #9
Line Input #9, selP
Close #9
Else
selP = App.Path
End If
Form1.Text5.Text = selP
DoEvents
Form10.Label1.Width = 0.45 * Tw
DoEvents
Sleep (105)
Load Form3
For asdfh = 0.45 To 0.525 Step 0.045
DoEvents
Form10.Label1.Width = asdfh * Tw
DoEvents
Sleep (4)
Next
DoEvents
Form10.Label1.Width = 0.525 * Tw
DoEvents
Sleep (103)
DoEvents
Dim rnm As String, gnm As String, bnm As String
If Dir(App.Path & "\GUI_Color.config") <> "" Then
On Error Resume Next
Open App.Path & "\GUI_Color.config" For Input As #11
Line Input #11, rnm
Line Input #11, gnm
Line Input #11, bnm
Close #11
Form3.HScroll1.Value = Val(rnm)
Form3.HScroll2.Value = Val(gnm)
Form3.HScroll3.Value = Val(bnm)
DoEvents
Sleep (95)
DoEvents
Form10.Label1.Width = 0.585 * Tw
DoEvents
Form1.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
Form1.Frame1.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
DoEvents
Sleep (50)
DoEvents
Form10.Label1.Width = 0.59 * Tw
DoEvents
Form1.Frame2.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
Form1.Option1.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
DoEvents
Sleep (45)
DoEvents
Form10.Label1.Width = 0.6 * Tw
DoEvents
Form1.Option2.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
Form1.Option3.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
DoEvents
Sleep (50)
DoEvents
Form10.Label1.Width = 0.615 * Tw
DoEvents
Form1.Option4.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
Form1.Check1.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
DoEvents
Sleep (40)
DoEvents
Form10.Label1.Width = 0.625 * Tw
DoEvents
Form1.Check2.BackColor = RGB(Val(rnm), Val(gnm), Val(bnm))
End If
DoEvents
Sleep (55)
DoEvents
Form10.Label1.Width = 0.65 * Tw
DoEvents
NumOfHi = 30
On Error Resume Next
Open App.Path & "\DyEncGUI5.0.OtherSettings.config" For Input As #20
If Err.Number > 0 Then
MsgBox "读取" & App.Path & "\DyEncGUI5.0.OtherSettings.config配置文件失败。", 48
Exit Sub
End If
DoEvents
Sleep (80)
DoEvents
Form10.Label1.Width = 0.685 * Tw
DoEvents
Dim NumOfHi_s As String, OpenFN_s As String
Line Input #20, DU_FoN
Line Input #20, DU_IconP
Line Input #20, NumOfHi_s
Line Input #20, OpenFN_s
Close #20
DoEvents
Sleep (105)
DoEvents
Form10.Label1.Width = 0.725 * Tw
NumOfHi = Val(NumOfHi_s)
OpenFN = Val(OpenFN_s)
SetFoName (DU_FoN)
On Error Resume Next
Form1.Icon = LoadPicture(DU_IconP)
On Error Resume Next
Form2.Icon = LoadPicture(DU_IconP)
Sleep (70)
DoEvents
DoEvents
Form10.Label1.Width = 0.775 * Tw
DoEvents
On Error Resume Next
Form3.Icon = LoadPicture(DU_IconP)
On Error Resume Next
Form4.Icon = LoadPicture(DU_IconP)
DoEvents
Sleep (105)
DoEvents
Form10.Label1.Width = 0.825 * Tw
Dim deab As Integer, jsb2 As Boolean
For deab = 0 To Screen.FontCount - 1
If Screen.Fonts(deab) = "未曾忘记那位少年" Then
jsb2 = True
End If
Next deab
If jsb2 = False Then
On Error Resume Next
AddFontResource App.Path & "\DyEncGUI_FontsLib\DyEncGUI_FirstFonts.ttf"
SetFoName ("未曾忘记那位少年")
DoEvents
Sleep (75)
DoEvents
Form10.Label1.Width = 0.865 * Tw
DoEvents
End If
DoEvents
Sleep (95)
DoEvents
Form10.Label1.Width = 0.9 * Tw
DoEvents
Form1.Show
DoEvents
On Error Resume Next
If StrConv(Right(RealCom, 13), vbLowerCase) = ".dyenc_output" Then
Form1.Text3.Text = RealCom
Form1.Option2.Value = True
Form1.Text1.SetFocus
Else
Form1.Text3.Text = RealCom
Form1.Text1.SetFocus
End If
If Command() = "" Then
Form1.Command1.SetFocus
End If
DoEvents
Sleep (75)
DoEvents
Form10.Label1.Width = 0.95 * Tw
DoEvents
DoEvents
Sleep (20)
DoEvents
Unload Form10
End Sub
Sub SetFoName(FoN As String)
Dim fnc2 As String
fnc2 = FoN
Form1.fontname = fnc2
Form1.Check2.fontname = fnc2
Form1.Check1.fontname = fnc2
Form1.Label1.fontname = fnc2
Form1.Label2.fontname = fnc2
Form1.Label3.fontname = fnc2
Form1.Label4.fontname = fnc2
Form1.Label5.fontname = fnc2
Form1.Label6.fontname = fnc2
Form1.Label7.fontname = fnc2
Form1.Label8.fontname = fnc2
Form1.Label9.fontname = fnc2
Form1.Label10.fontname = fnc2
Form1.Label11.fontname = fnc2
Form1.Option1.fontname = fnc2
Form1.Option2.fontname = fnc2
Form1.Option3.fontname = fnc2
Form1.Option4.fontname = fnc2
Form1.Command1.fontname = fnc2
Form1.Command2.fontname = fnc2
Form1.Command3.fontname = fnc2
Form1.Command4.fontname = fnc2
Form1.Command5.fontname = fnc2
Form1.Frame1.fontname = fnc2
Form1.Frame2.fontname = fnc2
Form1.Text1.Font = fnc2
Form1.Text2.Font = fnc2
Form1.Text3.fontname = fnc2
Form1.Text4.fontname = fnc2
Form1.Text5.fontname = fnc2
Form2.fontname = fnc2
Form2.Label1.fontname = fnc2
Form2.Text1.fontname = fnc2
Form2.Command1.fontname = fnc2
Form3.fontname = fnc2
Form3.Command1.fontname = fnc2
Form3.Command2.fontname = fnc2
Form3.Frame1.fontname = fnc2
Form3.Label1.fontname = fnc2
Form3.Label2.fontname = fnc2
Form3.Label3.fontname = fnc2
Form3.Label4.fontname = fnc2
Form3.Text1.fontname = fnc2
Form3.Text2.fontname = fnc2
Form3.Text3.fontname = fnc2
Form4.fontname = fnc2
Form4.Check1.fontname = fnc2
Form4.Combo1.fontname = fnc2
Form4.Command1.fontname = fnc2
Form4.Command2.fontname = fnc2
Form4.Command3.fontname = fnc2
Form4.Command4.fontname = fnc2
Form4.Frame1.fontname = fnc2
Form4.Frame2.fontname = fnc2
Form4.Frame3.fontname = fnc2
Form4.Frame4.fontname = fnc2
Form4.Label1.fontname = fnc2
Form4.Label10.fontname = fnc2
Form4.Label2.fontname = fnc2
Form4.Label3.fontname = fnc2
Form4.Label4.fontname = fnc2
Form4.Label5.fontname = fnc2
Form4.Label6.fontname = fnc2
Form4.Label7.fontname = fnc2
Form4.Label8.fontname = fnc2
Form4.Label9.fontname = fnc2
Form4.Text1.fontname = fnc2
Form4.Text2.fontname = fnc2
Form5.Label1.fontname = fnc2
Form5.Label2.fontname = fnc2
Form5.Label3.fontname = fnc2
Form5.Text1.fontname = fnc2
Form6.List1.fontname = fnc2
Form7.Text1.fontname = fnc2
End Sub
'*******************************************************
Public Sub MsgB(Word1 As String)
InpWord = Word1
Load Form7
Form7.Text1.Text = InpWord
If Len(Form7.Text1.Text) > 20 Then
Form7.Text1.FontSize = 16
Else
Form7.Text1.FontSize = 22
End If
Form7.Show (1)
InpWord = ""
Do While Rtb = 0
DoEvents
Loop
Rtb = 0
End Sub