-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmSettings.frm
379 lines (365 loc) · 12.5 KB
/
frmSettings.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
VERSION 5.00
Object = "{4C5605EA-720A-490B-820A-E3CDEE939855}#1.0#0"; "vkusercontrolsxp.ocx"
Begin VB.Form frmSettings
BorderStyle = 0 'None
Caption = "Application Settings"
ClientHeight = 6705
ClientLeft = 0
ClientTop = 0
ClientWidth = 9810
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6705
ScaleWidth = 9810
ShowInTaskbar = 0 'False
Begin vkUserContolsXP.vkCheck cbRandomTheme
Height = 375
Left = 240
TabIndex = 11
Top = 1320
Width = 4815
_ExtentX = 8493
_ExtentY = 661
BackColor = 16777215
BackStyle = 0
Caption = "Use Random Theme"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin JURA.StylerButton cmdClose
Height = 255
Left = 9240
TabIndex = 2
Top = 0
Width = 375
_ExtentX = 661
_ExtentY = 450
Caption = "X"
CaptionDisableColor= 12236471
CaptionEffectColor= 16777215
FocusDottedRect = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
RoundedValue = 1
End
Begin JURA.StylerButton cmdMin
Height = 255
Left = 9000
TabIndex = 1
Top = 0
Width = 255
_ExtentX = 450
_ExtentY = 450
Caption = "-"
CaptionDisableColor= 12236471
CaptionEffectColor= 16777215
FocusDottedRect = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
RoundedValue = 1
End
Begin vkUserContolsXP.vkFrame fSettings
Height = 6705
Left = 0
TabIndex = 0
Top = 0
Width = 9810
_ExtentX = 17304
_ExtentY = 11827
Caption = "Application Settings"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TitleColor1 = 33023
TitleColor2 = 8438015
TitleGradient = 2
TitleHeight = 360
BorderColor = 33023
RoundAngle = 5
BorderWidth = 2
Begin vkUserContolsXP.vkTextBox txtCollegeName
Height = 375
Left = 1440
TabIndex = 10
Top = 600
Width = 8055
_ExtentX = 14208
_ExtentY = 661
BeginProperty LegendFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LegendForeColor = 16750899
End
Begin vkUserContolsXP.vkLabel lblCollegeName
Height = 255
Left = 240
TabIndex = 9
Top = 720
Width = 1215
_ExtentX = 2143
_ExtentY = 450
BackColor = 16777215
BackStyle = 0
Caption = "College Name:"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin vkUserContolsXP.vkFrame vkFrame1
Height = 1935
Left = 240
TabIndex = 4
Top = 3360
Width = 2415
_ExtentX = 4260
_ExtentY = 3413
Caption = "Examination Month && Year"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TitleColor1 = 8421504
TitleColor2 = 14737632
TitleGradient = 2
TitleHeight = 300
BorderColor = 12632256
Begin VB.ComboBox cmbExamYear
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 240
TabIndex = 8
Top = 1320
Width = 1935
End
Begin vkUserContolsXP.vkLabel lblYear
Height = 255
Left = 240
TabIndex = 7
Top = 1080
Width = 1095
_ExtentX = 1931
_ExtentY = 450
BackColor = 16777215
BackStyle = 0
Caption = "Year:"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin vkUserContolsXP.vkLabel lblMonth
Height = 255
Left = 240
TabIndex = 6
Top = 360
Width = 1095
_ExtentX = 1931
_ExtentY = 450
BackColor = 16777215
BackStyle = 0
Caption = "Month:"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.ComboBox cmbExamMonth
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 240
TabIndex = 5
Top = 600
Width = 1935
End
End
Begin vkUserContolsXP.vkCommand cmdSave
Height = 495
Left = 7320
TabIndex = 3
Top = 5880
Width = 2055
_ExtentX = 3625
_ExtentY = 873
Caption = "Save"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
End
Attribute VB_Name = "frmSettings"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim SettingsTop As Integer
Private Sub CmdClose_Click()
Unload Me
End Sub
Private Sub cmdMin_Click()
Dim i As Long
If State = 1 Then
State = 0
cmdMin.Caption = "+"
For i = 6705 To 310 Step -150
Me.Height = i
DoEvents
Next i
Me.Height = 310
fSettings.Height = 310
fSettings.BorderWidth = 0
Me.Top = 100
Else
State = 1
cmdMin.Caption = "--"
For i = 310 To 6705 Step 150
Me.Height = i
DoEvents
Next i
Me.Height = 6705
fSettings.Height = 6705
fSettings.BorderWidth = 2
Me.Top = SettingsTop
End If
End Sub
Private Sub cmdSave_Click()
On Error Resume Next
If cbRandomTheme.Value = vbChecked Then
SaveSetting App.CompanyName, "Settings", "flgRandomTheme", True 'Odd or Even Semester
flgRandomTheme = True
Else
SaveSetting App.CompanyName, "Settings", "flgRandomTheme", False 'Odd or Even Semester
flgRandomTheme = False
End If
SaveSetting App.CompanyName, "Settings", "ExamMonth", Trim(cmbExamMonth.Text)
strExamMonth = cmbExamMonth.Text
SaveSetting App.CompanyName, "Settings", "ExamYear", Trim(cmbExamYear.Text)
strExamYear = cmbExamYear.Text
SaveSetting App.CompanyName, "Settings", "CollegeName", Trim(txtCollegeName.Text)
strCollegeName = txtCollegeName.Text
If Err.Number = 0 Then
MsgBox "Settings Saved Succesfully"
End If
End Sub
Private Sub Form_Load()
CreateRoundRectFromWindow Me, 7, 7
Me.Top = (mdiMain.Height - Me.Height) / 5
Me.Left = (mdiMain.Width - Me.Width) / 2
Me.BackColor = mdiMain.BackColor
Call frmColor(frmSettings)
Call cmbExamMonthYearData
cmbExamMonth.Text = strExamMonth
cmbExamYear.Text = strExamYear
txtCollegeName.Text = strCollegeName
If flgRandomTheme = True Then
cbRandomTheme.Value = vbChecked
Else
cbRandomTheme.Value = vbUnchecked
End If
End Sub
Private Sub cmbExamMonthYearData()
cmbExamMonth.AddItem "JAN/FEB"
cmbExamMonth.AddItem "FEB/MAR"
cmbExamMonth.AddItem "MAR/APR"
cmbExamMonth.AddItem "APR/MAY"
cmbExamMonth.AddItem "MAY/JUN"
cmbExamMonth.AddItem "JUN/JUL"
cmbExamMonth.AddItem "JUL/AUG"
cmbExamMonth.AddItem "AUG/SEP"
cmbExamMonth.AddItem "SEP/OCT"
cmbExamMonth.AddItem "OCT/NOV"
cmbExamMonth.AddItem "NOV/DEC"
cmbExamMonth.AddItem "DEC/JAN"
cmbExamMonth.Text = cmbExamMonth.List(0)
Dim i As Integer
For i = 0 To 10
cmbExamYear.AddItem "2006" + i
Next
cmbExamYear.Text = cmbExamYear.List(0)
End Sub