-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.frm
732 lines (585 loc) · 24.2 KB
/
message.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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
VERSION 5.00
Begin VB.Form frmMessage
Caption = "SteamyDock Enhanced Icon Settings Tool"
ClientHeight = 2100
ClientLeft = 4845
ClientTop = 4800
ClientWidth = 5985
ControlBox = 0 'False
Icon = "message.frx":0000
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 2100
ScaleWidth = 5985
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraMessage
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Height = 1485
Left = -30
TabIndex = 2
Top = 0
Width = 6000
Begin VB.Frame fraPicVB
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Height = 1440
Left = 195
TabIndex = 4
Top = 75
Width = 735
Begin VB.Image picVBInformation
Appearance = 0 'Flat
Height = 720
Left = 0
Top = 0
Visible = 0 'False
Width = 720
End
Begin VB.Image picVBCritical
Height = 720
Left = 0
Top = -15
Visible = 0 'False
Width = 720
End
Begin VB.Image picVBExclamation
Appearance = 0 'Flat
Height = 720
Left = 0
Top = 0
Visible = 0 'False
Width = 720
End
Begin VB.Image picVBQuestion
Height = 720
Left = 0
Top = 0
Visible = 0 'False
Width = 720
End
End
Begin VB.Label lblMessage
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "* Some message text and more text in addition"
Height = 195
Left = 1110
TabIndex = 3
Top = 360
Width = 4455
WordWrap = -1 'True
End
End
Begin VB.CommandButton btnButtonTwo
Caption = "&No"
Height = 372
Left = 4980
TabIndex = 1
Top = 1620
Width = 972
End
Begin VB.CommandButton btnButtonOne
Caption = "&Yes"
Height = 372
Left = 3885
TabIndex = 0
Top = 1620
Width = 972
End
Begin VB.CheckBox chkShowAgain
Caption = "&Hide this message."
Height = 420
Left = 75
TabIndex = 5
Top = 1560
Visible = 0 'False
Width = 1755
End
End
Attribute VB_Name = "frmMessage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------
' Module : frmMessage
' Author : beededea
' Date : 20/11/2023
' Purpose :
'---------------------------------------------------------------------------------------
'@IgnoreModule IntegerDataType, ModuleWithoutFolder
' .74 DAEB 22/05/2022 rDIConConfig.frm Msgbox replacement that can be placed on top of the form instead as the middle of the screen STARTS
Option Explicit
Private yesNoReturnValue As Integer
Private formMsgContext As String
Private formShowAgainChkBox As Boolean
'Private lastFormHeight As Long
Private Const cMsgBoxAFormHeight As Long = 2565
Private Const cMsgBoxAFormWidth As Long = 11055
Private mPropMessage As String
Private mPropTitle As String
Private mPropMsgContext As String
Private mPropShowAgainChkBox As Boolean
Private mPropButtonVal As Integer
Private mPropReturnedValue As Integer
'---------------------------------------------------------------------------------------
' Procedure : Form_Load
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub Form_Load()
Dim Ctrl As Control
On Error GoTo Form_Load_Error
msgBoxACurrentWidth = cMsgBoxAFormWidth
msgBoxACurrentHeight = cMsgBoxAFormHeight
'If gblDpiAwareness = "1" Then
' save the initial positions of ALL the controls on the msgbox form
Call SaveSizes(Me, msgBoxAControlPositions(), msgBoxACurrentWidth, msgBoxACurrentHeight)
'End If
' .TBD DAEB 05/05/2021 frmMessage.frm Added the font mod. here instead of within the changeFont tool
' as each instance of the form is new, the font modification must be here.
For Each Ctrl In Me.Controls
If (TypeOf Ctrl Is CommandButton) Or (TypeOf Ctrl Is textBox) Or (TypeOf Ctrl Is FileListBox) Or (TypeOf Ctrl Is Label) Or (TypeOf Ctrl Is ComboBox) Or (TypeOf Ctrl Is CheckBox) Or (TypeOf Ctrl Is OptionButton) Or (TypeOf Ctrl Is Frame) Or (TypeOf Ctrl Is ListBox) Then
If gblPrefsFont <> "" Then Ctrl.Font.Name = gblPrefsFont
If gblDpiAwareness = "1" Then
If Val(Abs(gblPrefsFontSizeHighDPI)) > 0 Then Ctrl.Font.Size = Val(Abs(gblPrefsFontSizeHighDPI))
Else
If Val(Abs(gblPrefsFontSizeLowDPI)) > 0 Then Ctrl.Font.Size = Val(Abs(gblPrefsFontSizeLowDPI))
End If
'Ctrl.Font.Italic = CBool(SDSuppliedFontItalics) TBD
'If suppliedStyle <> "" Then Ctrl.Font.Style = suppliedStyle
End If
Next
chkShowAgain.Visible = False
On Error GoTo 0
Exit Sub
Form_Load_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Form_Load of Form frmMessage"
End Sub
'---------------------------------------------------------------------------------------
' Property : Form_Resize
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub Form_Resize()
Dim currentFont As Long: currentFont = 0
Dim ratio As Double: ratio = 0
On Error GoTo Form_Resize_Error
If Me.WindowState = vbMinimized Then Exit Sub
ratio = cMsgBoxAFormHeight / cMsgBoxAFormWidth
If gblDpiAwareness = "1" Then
currentFont = Val(gblPrefsFontSizeHighDPI)
Else
currentFont = Val(gblPrefsFontSizeLowDPI)
End If
If msgBoxADynamicSizingFlg = True Then
Call setMessageIconImagesLight(1920)
Call resizeControls(Me, msgBoxAControlPositions(), msgBoxACurrentWidth, msgBoxACurrentHeight, currentFont)
Me.Width = Me.Height / ratio ' maintain the aspect ratio
Else
Call setMessageIconImagesLight(600)
End If
'' If widgetPrefs.mnuDark.Checked = True Then
'' Call setMessageIconImagesDark(determineIconWidth(Me, msgBoxADynamicSizingFlg))
'' Else
' Call setMessageIconImagesLight(1920)
'' End If
On Error GoTo 0
Exit Sub
Form_Resize_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property Form_Resize of Form frmMessage"
End Sub
'---------------------------------------------------------------------------------------
' Property : btnButtonTwo_Click
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub btnButtonTwo_Click()
On Error GoTo btnButtonTwo_Click_Error
If formShowAgainChkBox = True Then SaveSetting App.EXEName, "Options", "Show message" & formMsgContext, chkShowAgain.Value
yesNoReturnValue = 7
Me.Hide
On Error GoTo 0
Exit Sub
btnButtonTwo_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property btnButtonTwo_Click of Form frmMessage"
End Sub
'---------------------------------------------------------------------------------------
' Property : btnButtonOne_Click
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub btnButtonOne_Click()
On Error GoTo btnButtonOne_Click_Error
Me.Visible = False
If formShowAgainChkBox = True Then SaveSetting App.EXEName, "Options", "Show message" & formMsgContext, chkShowAgain.Value
yesNoReturnValue = 6
Me.Hide
On Error GoTo 0
Exit Sub
btnButtonOne_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property btnButtonOne_Click of Form frmMessage"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : Display
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Sub Display()
Dim intShow As Integer
On Error GoTo Display_Error
If formShowAgainChkBox = True Then
chkShowAgain.Visible = True
' Returns a key setting value from an application's entry in the Windows registry
intShow = GetSetting(App.EXEName, "Options", "Show message" & formMsgContext, vbUnchecked)
If intShow = vbUnchecked Then
Me.Show vbModal
End If
Else
Me.Show vbModal
End If
On Error GoTo 0
Exit Sub
Display_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Display of Form frmMessage"
End Sub
'
'---------------------------------------------------------------------------------------
' Property : propMessage
' Author : beededea
' Date : 23/09/2023
' Purpose : property to allow a message to be passed to the form
'---------------------------------------------------------------------------------------
'
Public Property Let propMessage(ByVal newValue As String)
On Error GoTo propMessage_Error
If mPropMessage <> newValue Then mPropMessage = newValue Else Exit Property
lblMessage.Caption = mPropMessage
' Expand the form and move the other controls if the message is too long to show.
If msgBoxADynamicSizingFlg = True Then
' this causes a resize event
Me.Height = (screenHeightTwips / 5.5) '+ intDiff
Else
fraPicVB.Top = 285
End If
On Error GoTo 0
Exit Property
propMessage_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propMessage of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Procedure : propMessage
' Author : beededea
' Date : 17/05/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Get propMessage() As String
On Error GoTo propMessageGet_Error
propMessage = mPropMessage
On Error GoTo 0
Exit Property
propMessageGet_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure propMessage of Class Module cwhelp"
End Property
'---------------------------------------------------------------------------------------
' Property : propTitle
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Let propTitle(ByVal newValue As String)
On Error GoTo propTitle_Error
If mPropTitle <> newValue Then mPropTitle = newValue Else Exit Property
If mPropTitle = "" Then
Me.Caption = "Diesel-Volume-Control-VB6 Message."
Else
Me.Caption = mPropTitle
End If
On Error GoTo 0
Exit Property
propTitle_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propTitle of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Procedure : propTitle
' Author : beededea
' Date : 17/05/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Get propTitle() As String
On Error GoTo propTitleGet_Error
propTitle = mPropTitle
On Error GoTo 0
Exit Property
propTitleGet_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure propTitle of Class Module cwhelp"
End Property
'---------------------------------------------------------------------------------------
' Property : propMsgContext
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Let propMsgContext(ByVal newValue As String)
On Error GoTo propMsgContext_Error
If mPropMsgContext <> newValue Then mPropMsgContext = newValue Else Exit Property
formMsgContext = mPropMsgContext
On Error GoTo 0
Exit Property
propMsgContext_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propMsgContext of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Procedure : propMsgContext
' Author : beededea
' Date : 17/05/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Get propMsgContext() As String
On Error GoTo propMsgContextGet_Error
propMsgContext = mPropMsgContext
On Error GoTo 0
Exit Property
propMsgContextGet_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure propMsgContext of Class Module cwhelp"
End Property
'---------------------------------------------------------------------------------------
' Procedure : propReturnedValue
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Get propReturnedValue() As Integer
On Error GoTo propReturnedValue_Error
propReturnedValue = yesNoReturnValue
On Error GoTo 0
Exit Property
propReturnedValue_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure propReturnedValue of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Property : propReturnedValue
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Let propReturnedValue(ByVal newValue As Integer)
On Error GoTo propReturnedValue_Error
If mPropReturnedValue <> newValue Then mPropReturnedValue = newValue Else Exit Property
formShowAgainChkBox = mPropReturnedValue
On Error GoTo 0
Exit Property
propReturnedValue_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propReturnedValue of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Property : propShowAgainChkBox
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Let propShowAgainChkBox(ByVal newValue As Boolean)
On Error GoTo propShowAgainChkBox_Error
If mPropShowAgainChkBox <> newValue Then mPropShowAgainChkBox = newValue Else Exit Property
formShowAgainChkBox = mPropShowAgainChkBox
On Error GoTo 0
Exit Property
propShowAgainChkBox_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propShowAgainChkBox of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Procedure : propShowAgainChkBox
' Author : beededea
' Date : 17/05/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Get propShowAgainChkBox() As Boolean
On Error GoTo propShowAgainChkBoxGet_Error
propShowAgainChkBox = mPropShowAgainChkBox
On Error GoTo 0
Exit Property
propShowAgainChkBoxGet_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure propShowAgainChkBox of Class Module cwhelp"
End Property
'---------------------------------------------------------------------------------------
' Property : propButtonVal
' Author : beededea
' Date : 23/09/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Property Let propButtonVal(ByVal newValue As Integer)
Dim fileToPlay As String: fileToPlay = vbNullString
On Error GoTo propButtonVal_Error
If mPropButtonVal <> newValue Then mPropButtonVal = newValue Else Exit Property
btnButtonOne.Visible = False
btnButtonTwo.Visible = False
picVBInformation.Visible = False
picVBCritical.Visible = False
picVBExclamation.Visible = False
picVBQuestion.Visible = False
If mPropButtonVal = 0 Then ' vbInformation
picVBInformation.Visible = True
ElseIf mPropButtonVal >= 64 Then ' vbInformation
mPropButtonVal = mPropButtonVal - 64
picVBInformation.Visible = True
ElseIf mPropButtonVal >= 48 Then ' vbExclamation
mPropButtonVal = mPropButtonVal - 48
picVBExclamation.Visible = True
' .86 DAEB 06/06/2022 rDIConConfig.frm Add a sound to the msgbox for critical and exclamations? ting and belltoll.wav files
fileToPlay = "ting.wav"
If fFExists(App.path & "\resources\sounds\" & fileToPlay) Then
PlaySound App.path & "\resources\sounds\" & fileToPlay, ByVal 0&, SND_FILENAME Or SND_ASYNC
End If
ElseIf mPropButtonVal >= 32 Then ' vbQuestion
mPropButtonVal = mPropButtonVal - 32
picVBQuestion.Visible = True
ElseIf mPropButtonVal >= 20 Then ' vbCritical
mPropButtonVal = mPropButtonVal - 20
picVBCritical.Visible = True
' .86 DAEB 06/06/2022 rDIConConfig.frm Add a sound to the msgbox for critical and exclamations? ting and belltoll.wav files
fileToPlay = "belltoll01.wav"
If fFExists(App.path & "\resources\sounds\" & fileToPlay) Then
PlaySound App.path & "\resources\sounds\" & fileToPlay, ByVal 0&, SND_FILENAME Or SND_ASYNC
End If
End If
If mPropButtonVal = 0 Then ' vbOKOnly 0
picVBInformation.Visible = True
btnButtonOne.Visible = False
btnButtonTwo.Visible = True
btnButtonTwo.Caption = "OK"
'btnButtonOne.Left = 4620
End If
If mPropButtonVal = 1 Then ' vbOKCancel 1
btnButtonOne.Visible = True
btnButtonTwo.Visible = True
btnButtonOne.Caption = "OK"
btnButtonTwo.Caption = "Cancel"
picVBQuestion.Visible = True
End If
If mPropButtonVal = 2 Then 'vbAbortRetryIgnore 2
btnButtonOne.Visible = True
btnButtonTwo.Visible = True
'btnButtonThree.Visible = True
btnButtonOne.Caption = "Abort"
btnButtonOne.Caption = "Retry"
'btnButtonThree.Caption = "Ignore"
picVBQuestion.Visible = True
End If
If mPropButtonVal = 3 Then ' vbYesNoCancel 3
btnButtonOne.Visible = True
btnButtonTwo.Visible = True
'btnButtonThree.Visible = True
btnButtonOne.Caption = "Yes"
btnButtonTwo.Caption = "No"
'btnButtonThree.Caption = "Cancel"
picVBQuestion.Visible = True
End If
If mPropButtonVal = 4 Then ' vbYesNo 4
btnButtonOne.Visible = True
btnButtonTwo.Visible = True
btnButtonOne.Caption = "Yes"
btnButtonTwo.Caption = "No"
picVBQuestion.Visible = True
End If
If mPropButtonVal = 5 Then ' vbRetryCancel 5
btnButtonOne.Visible = True
btnButtonTwo.Visible = True
btnButtonOne.Caption = "Retry"
btnButtonTwo.Caption = "Cancel"
picVBQuestion.Visible = True
End If
On Error GoTo 0
Exit Property
propButtonVal_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Property propButtonVal of Form frmMessage"
End Property
'---------------------------------------------------------------------------------------
' Procedure : loadHigherResMessageImages
' Author : beededea
' Date : 18/06/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub loadHigherResMessageImages()
On Error GoTo loadHigherResMessageImages_Error
If Me.WindowState = vbMinimized Then Exit Sub
' If widgetPrefs.mnuDark.Checked = True Then
' Call setMessageIconImagesDark(determineIconWidth(Me, msgBoxADynamicSizingFlg))
' Else
Call setMessageIconImagesLight(1920)
' End If
On Error GoTo 0
Exit Sub
loadHigherResMessageImages_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure loadHigherResMessageImages of Form widgetPrefs"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : setPrefsIconImagesLight
' Author : beededea
' Date : 22/06/2023
' Purpose :
'---------------------------------------------------------------------------------------
'
Private Sub setMessageIconImagesLight(ByVal thisIconWidth As Long)
Dim resourcePath As String: resourcePath = vbNullString
On Error GoTo setMessageIconImagesLight_Error
resourcePath = App.path & "\resources\images"
If fFExists(resourcePath & "\windowsInformation" & thisIconWidth & ".jpg") Then Set picVBInformation.Picture = LoadPicture(resourcePath & "\windowsInformation" & thisIconWidth & ".jpg")
If fFExists(resourcePath & "\windowsOrangeExclamation" & thisIconWidth & ".jpg") Then Set picVBExclamation.Picture = LoadPicture(resourcePath & "\windowsOrangeExclamation" & thisIconWidth & ".jpg")
If fFExists(resourcePath & "\windowsShieldQMark" & thisIconWidth & ".jpg") Then Set picVBQuestion.Picture = LoadPicture(resourcePath & "\windowsShieldQMark" & thisIconWidth & ".jpg")
If fFExists(resourcePath & "\windowsCritical" & thisIconWidth & ".jpg") Then Set picVBCritical.Picture = LoadPicture(resourcePath & "\windowsCritical" & thisIconWidth & ".jpg")
picVBInformation.Refresh
picVBQuestion.Refresh
picVBExclamation.Refresh
picVBCritical.Refresh
On Error GoTo 0
Exit Sub
setMessageIconImagesLight_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure setMessageIconImagesLight of Form frmMessage"
End Sub
'---------------------------------------------------------------------------------------
' Procedure : IsVisible
' Author : beededea
' Date : 08/05/2023
' Purpose : calling a manual property to a form allows external checks to the form to
' determine whether it is loaded, without also activating the form automatically.
'---------------------------------------------------------------------------------------
'
Public Property Get IsVisible() As Boolean
On Error GoTo IsVisible_Error
If Me.WindowState = vbNormal Then
IsVisible = Me.Visible
Else
IsVisible = False
End If
On Error GoTo 0
Exit Property
IsVisible_Error:
With Err
If .Number <> 0 Then
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure IsVisible of Form panzerPrefs"
Resume Next
End If
End With
End Property