-
Notifications
You must be signed in to change notification settings - Fork 2
/
calczaf.frm
1663 lines (1490 loc) · 52.3 KB
/
calczaf.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
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "ComDlg32.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.4#0"; "comctl32.Ocx"
Begin VB.Form FormMAIN
Caption = "CalcZAF (Calculate ZAF and Phi-Rho-Z Corrections)"
ClientHeight = 4920
ClientLeft = 690
ClientTop = 3060
ClientWidth = 10605
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Icon = "CALCZAF.frx":0000
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 4920
ScaleWidth = 10605
Begin ComctlLib.StatusBar StatusBarAuto
Align = 2 'Align Bottom
Height = 255
Left = 0
TabIndex = 0
Top = 4665
Width = 10605
_ExtentX = 18706
_ExtentY = 450
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 3
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 14579
Key = "status"
Object.Tag = ""
Object.ToolTipText = "Automation status"
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Bevel = 2
Object.Width = 1764
MinWidth = 1764
Text = "Cancel"
TextSave = "Cancel"
Key = "cancel"
Object.Tag = ""
Object.ToolTipText = "Click here to cancel automation"
EndProperty
BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Bevel = 2
Object.Width = 1764
MinWidth = 1764
Text = "Pause"
TextSave = "Pause"
Key = "pause"
Object.Tag = ""
Object.ToolTipText = "Click here to pause automation"
EndProperty
EndProperty
End
Begin VB.Timer TimerLogWindow
Interval = 500
Left = 480
Top = 0
End
Begin MSComDlg.CommonDialog CMDialog1
Left = 0
Top = 0
_ExtentX = 847
_ExtentY = 847
_Version = 393216
CancelError = -1 'True
FontSize = 0
MaxFileSize = 256
End
Begin RichTextLib.RichTextBox TextLog
Height = 4335
Left = 0
TabIndex = 1
Top = 0
Width = 4455
_ExtentX = 7858
_ExtentY = 7646
_Version = 393217
Enabled = -1 'True
ScrollBars = 2
TextRTF = $"CALCZAF.frx":59D8A
End
Begin VB.Label LabelTotal
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 4560
TabIndex = 2
Top = 120
Visible = 0 'False
Width = 855
End
Begin VB.Label LabelCalculated
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 4560
TabIndex = 3
Top = 360
Visible = 0 'False
Width = 855
End
Begin VB.Label LabelAtomic
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 4560
TabIndex = 4
Top = 600
Visible = 0 'False
Width = 855
End
Begin VB.Label LabelTotalOxygen
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 7320
TabIndex = 5
Top = 120
Visible = 0 'False
Width = 855
End
Begin VB.Label LabelExcess
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 7320
TabIndex = 7
Top = 360
Visible = 0 'False
Width = 855
End
Begin VB.Label LabelZbar
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 7320
TabIndex = 6
Top = 600
Visible = 0 'False
Width = 855
End
Begin VB.Menu menuFile
Caption = "&File"
HelpContextID = 98
Begin VB.Menu menuFileOpen
Caption = "&Open CalcZAF Input Data File (Test with CALCZAF.DAT, CALCBIN.DAT, AuCu_NBS-K-ratios.DAT, Olivine particle-JTA-0.5um.DAT, etc.)"
HelpContextID = 715
End
Begin VB.Menu menuFileClose
Caption = "&Close CalcZAF Input Data File"
HelpContextID = 716
End
Begin VB.Menu menuFileSeparator1
Caption = "-"
End
Begin VB.Menu menuFileOpenAndProcess
Caption = "Open Input Data File And Calculate/Export All"
End
Begin VB.Menu menuFileSeparator2
Caption = "-"
End
Begin VB.Menu menuFileExport
Caption = "Export CalcZAF Input Data File"
HelpContextID = 598
End
Begin VB.Menu menuFileUpdateCalcZAFSampleDataFiles
Caption = "Update CalcZAF Example Data Files"
HelpContextID = 768
End
Begin VB.Menu menuFileSeparator3
Caption = "-"
End
Begin VB.Menu menuFilePrintLog
Caption = "&Print Log"
HelpContextID = 101
End
Begin VB.Menu menuFilePrintSetup
Caption = "Print Setup"
HelpContextID = 102
End
Begin VB.Menu menuFileSeparator4
Caption = "-"
End
Begin VB.Menu menuFileExit
Caption = "Exit"
HelpContextID = 103
End
End
Begin VB.Menu menuEdit
Caption = "&Edit"
HelpContextID = 104
Begin VB.Menu menuEditCut
Caption = "Cut"
HelpContextID = 105
End
Begin VB.Menu menuEditCopy
Caption = "Copy"
HelpContextID = 106
End
Begin VB.Menu menuEditPaste
Caption = "Paste"
HelpContextID = 107
End
Begin VB.Menu menuEditSeparator1
Caption = "-"
End
Begin VB.Menu menuEditSelectAll
Caption = "Select All"
HelpContextID = 108
End
Begin VB.Menu menuClearAll
Caption = "Clear All"
HelpContextID = 109
End
End
Begin VB.Menu menuStandard
Caption = "&Standard"
HelpContextID = 110
Begin VB.Menu menuStandardStandardDatabase
Caption = "&Standard Database"
HelpContextID = 111
End
Begin VB.Menu menuStandardSeparator2
Caption = "-"
End
Begin VB.Menu menuStandardSelectStandardDatabase
Caption = "Select Standard Database"
HelpContextID = 717
End
Begin VB.Menu menuStandardEditStandardParameters
Caption = "&Edit Standard Coating Parameters"
HelpContextID = 719
End
Begin VB.Menu menuStandardSeparator3
Caption = "-"
End
Begin VB.Menu menuStandardAddStandardsToRun
Caption = "&Add/Remove Standards To/From Run"
HelpContextID = 796
End
End
Begin VB.Menu menuXray
Caption = "&X-Ray"
HelpContextID = 113
Begin VB.Menu menuXrayXrayDatabase
Caption = "&X-Ray Database"
HelpContextID = 114
End
Begin VB.Menu menuXrayCalculateSpectrometerPosition
Caption = "&Calculate Spectrometer Position"
End
Begin VB.Menu menuXraySeparator0
Caption = "-"
End
Begin VB.Menu menuXrayEmissionTable
Caption = "Emission Table (Ka, Kb, La, Lb, Ma, Mb)"
HelpContextID = 115
End
Begin VB.Menu menuXrayEdgeTable
Caption = "Edge Table (K, L-I, L-II, L-III, M-I, M-II, M-III, M-IV, M-V)"
HelpContextID = 116
End
Begin VB.Menu menuXrayFluorescentYieldTable
Caption = "Fluorescent Yield Table (Ka, Kb, La, Lb, Ma, Mb)"
HelpContextID = 117
End
Begin VB.Menu menuXraySeparator00
Caption = "-"
End
Begin VB.Menu menuXrayEmissionTable2
Caption = "Emission Table (Ln, Lg, Lv, Ll, Mg, Mz)"
End
Begin VB.Menu menuXrayFluorescentYieldTable2
Caption = "Fluorescent Yield Table (Ln, Lg, Lv, Ll, Mg, Mz)"
End
Begin VB.Menu menuXraySeparator000
Caption = "-"
End
Begin VB.Menu menuXrayMACTable
Caption = "MAC Table (Ka, Kb, La, Lb, Ma, Mb)"
HelpContextID = 118
End
Begin VB.Menu menuXrayMACTableComplete
Caption = "MAC Table (complete) (Ka, Kb, La, Lb, Ma, Mb)"
HelpContextID = 509
End
Begin VB.Menu menuXraySeparator111
Caption = "-"
End
Begin VB.Menu menuXrayMACTable2
Caption = "MAC Table (Ln, Lg, Lv, Ll, Mg, Mz)"
End
Begin VB.Menu menuXrayMACTableComplete2
Caption = "MAC Table (complete) (Ln, Lg, Lv, Ll, Mg, Mz)"
End
Begin VB.Menu menuXraySeparator1111
Caption = "-"
End
Begin VB.Menu menuXrayDisplayMACEmitterAbsorber
Caption = "&Display MAC Emitter Absorber Pair"
HelpContextID = 510
End
Begin VB.Menu menuXraySeparator1
Caption = "-"
End
Begin VB.Menu menuXrayEditXrayTable
Caption = "Edit XLINE.DAT Table"
HelpContextID = 119
End
Begin VB.Menu menuXrayEditXedgeTable
Caption = "Edit XEDGE.DAT Table"
HelpContextID = 120
End
Begin VB.Menu menuXrayEditXflurTable
Caption = "Edit XFLUR.DAT Table"
HelpContextID = 121
End
Begin VB.Menu menuXraySeparator10
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu menuXrayUpdateXLineTable
Caption = "Update XLINE.DAT Table (from XLINE.TXT)"
Visible = 0 'False
End
Begin VB.Menu menuXrayUpdateXEdgeTable
Caption = "Update XEDGE.DAT Table (from XEDGE.TXT)"
Visible = 0 'False
End
Begin VB.Menu menuXrayUpdateXFlurTable
Caption = "Update XFLUR.DAT Table (from XFLUR.TXT)"
Visible = 0 'False
End
Begin VB.Menu menuXraySeparator11
Caption = "-"
End
Begin VB.Menu menuXrayEditMACTable
Caption = "&Edit MAC Table"
HelpContextID = 122
End
Begin VB.Menu menuXraySeparator2
Caption = "-"
End
Begin VB.Menu menuXrayConvertELEMINFODAT
Caption = "Convert JTA ELEMINFO.DAT (Create New XLINE.DAT, XEDGE.DAT and XFLUR.DAT)"
HelpContextID = 123
End
Begin VB.Menu menuXraySeparator3
Caption = "-"
End
Begin VB.Menu menuXrayConvertMACMATDAT
Caption = "Create New CITZMU MAC Table (Create New CITZMU.DAT)"
HelpContextID = 124
End
Begin VB.Menu menuXrayCreateNewMcMasterMACTable
Caption = "Create New McMaster MAC Table (Create New MCMASTER.DAT)"
HelpContextID = 126
End
Begin VB.Menu menuXrayCreateNewMAC30MACTable
Caption = "Create New MAC30 MAC Table (Create New MAC30.DAT)"
HelpContextID = 127
End
Begin VB.Menu menuXrayCreateNewMACJTAMACTable
Caption = "Create New MACJTA MAC Table (Create New MACJTA.DAT)"
HelpContextID = 128
End
Begin VB.Menu menuXrayCreateNewFFASTMACTable
Caption = "Create New FFAST MAC Table (Create New FFAST.DAT)"
HelpContextID = 576
End
Begin VB.Menu menuXraySeparator33
Caption = "-"
End
Begin VB.Menu menuXrayCreateNewUSERMACTable
Caption = "Create Default User Defined MAC Table (Create Default USERMAC.DAT from another MAC file)"
HelpContextID = 825
End
Begin VB.Menu menuXrayOutputExistingUSERMACTable
Caption = "Output Exisiting User Defined MAC Table (Create New USERMAC.TXT and USERMAC2.TXT)"
End
Begin VB.Menu menuXrayUpdateUSERMACTable
Caption = "Update Existing User Defined MAC Table (Update USERMAC.DAT and USERMAC2.DAT)"
HelpContextID = 826
End
Begin VB.Menu menuXraySeparator7
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu menuXrayUpdateEdgeLineFlurFiles
Caption = "Update XLINE, XEDGE, XFLUR .DAT Files For Actinides"
HelpContextID = 628
Visible = 0 'False
End
Begin VB.Menu menuXrayConvertTextToData
Caption = "Convert XLINE, XEDGE, XFLUR .TXT Files To Binary .DAT Files"
HelpContextID = 630
Visible = 0 'False
End
Begin VB.Menu menuXrayConvertDataToText
Caption = "Convert Binary XLINE, XEDGE, XFLUR .DAT Files To .TXT Files"
Visible = 0 'False
End
Begin VB.Menu menuXraySeparator8
Caption = "-"
End
Begin VB.Menu menuXrayCreateNewXrayDatabase
Caption = "Create New X-Ray Database (XRAY.ALL -> XRAY.MDB)"
HelpContextID = 125
End
End
Begin VB.Menu menuAnalytical
Caption = "&Analytical"
HelpContextID = 129
Begin VB.Menu menuAnalyticalZAFSelections
Caption = "&ZAF, Phi-Rho-Z, Alpha Factor and Calibration Curve Selections"
HelpContextID = 134
End
Begin VB.Menu menuAnalyticalConditions
Caption = "&Operating Conditions"
HelpContextID = 135
End
Begin VB.Menu menuAnalyticalEmpiricalMACs
Caption = "&Empirical MACs"
HelpContextID = 133
End
Begin VB.Menu menuAnalyticalParticleandThinFilm
Caption = "&Particle and Thin Film"
HelpContextID = 528
End
Begin VB.Menu menuAnalyticalElements
Caption = "Display Current Sample Elements"
HelpContextID = 770
End
Begin VB.Menu menuAnalyticalSeparator1
Caption = "-"
End
Begin VB.Menu menuAnalyticalModelSeco
Caption = $"CALCZAF.frx":59E0E
End
Begin VB.Menu menuAnalyticalSecondary
Caption = "Correct Secondary Fluorescence Boundary Effects (correct intensities exported from PFE as ASCII file)"
End
Begin VB.Menu menuAnalyticalSeparator0
Caption = "-"
End
Begin VB.Menu menuAnalyticalElementalFactors
Caption = "Calculate Elemental To Oxide Factors"
HelpContextID = 131
End
Begin VB.Menu menuAnalyticalOxideFactors
Caption = "Calculate Oxide To Elemental Factors"
HelpContextID = 132
End
Begin VB.Menu menuStudentstTable
Caption = "Students ""t"" Table"
HelpContextID = 626
End
Begin VB.Menu menuAnalyticalSeparator11
Caption = "-"
End
Begin VB.Menu menuAnalyticalUseConductiveCoatingCorrectionForElectronAbsorption
Caption = "Use Conductive Coating Correction For Electron Absorption"
HelpContextID = 773
End
Begin VB.Menu menuAnalyticalUseConductiveCoatingCorrectionForXrayTransmission
Caption = "Use Conductive Coating Correction For Xray Transmission"
HelpContextID = 774
End
Begin VB.Menu menuAnalyticalSeparator2
Caption = "-"
End
Begin VB.Menu menuAnalyticalAlphaFactors
Caption = "&Calculate and Plot Binary Alpha Factors"
HelpContextID = 627
End
Begin VB.Menu menuAnalyticalKFactorsAlphaFactors
Caption = "Calculate and Ouput Binary K-Ratios and Alpha Factors for Periodic Table"
HelpContextID = 653
End
Begin VB.Menu menuAnalyticalSeparator4
Caption = "-"
End
Begin VB.Menu menuAnalyticalBinaryCalculationOptions
Caption = "&Binary Calculation Options"
HelpContextID = 136
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensities
Caption = $"CALCZAF.frx":59EA7
HelpContextID = 511
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensitiesAllCorrections
Caption = "Calculate Binary Intensities (Output Calculated Intensities for All Matrix Corrections and MAC Files, Single Line, Single File)"
HelpContextID = 139
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensitiesAllCorrections2
Caption = "Calculate Binary Intensities (Output Calculated Intensities for All Matrix Corrections and MAC Files, All Lines, Multiple Files)"
HelpContextID = 140
End
Begin VB.Menu menuAnalyticalSeparator5
Caption = "-"
End
Begin VB.Menu menuAnalyticalCalculateStandardConcentrations
Caption = "Calculate Standard Concentrations (Output Calculated Concentrations and Errors) (Test with CALCZAF2.DAT)"
HelpContextID = 603
End
Begin VB.Menu menuAnalyticalCalculateStandardConcentrationsAllCorrections
Caption = "Calculate Standard Concentrations for All Matrix Corrections and MAC Files, Single Line, Single File) (Test with CALCZAF2.DAT)"
HelpContextID = 604
End
Begin VB.Menu menuAnalyticalSeparator6
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensities1
Caption = "Calculate Binary Intensities (Output Corrected Atomic First Approximation)"
HelpContextID = 141
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensities2
Caption = "Calculate Binary Intensities (Output Corrected Mass First Approximation)"
HelpContextID = 142
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateBinaryIntensities3
Caption = "Calculate Binary Intensities (Output Corrected Electron First Approximation)"
HelpContextID = 143
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateFirstApproximations1
Caption = "Calculate First Approximations Only (Atomic Fraction)"
HelpContextID = 144
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateFirstApproximations2
Caption = "Calculate First Approximations Only (Mass Fraction)"
HelpContextID = 145
Visible = 0 'False
End
Begin VB.Menu menuAnalyticalCalculateFirstApproximations3
Caption = "Calculate First Approximations Only (Electron Fraction)"
HelpContextID = 146
Visible = 0 'False
End
End
Begin VB.Menu menuRun
Caption = "&Run"
HelpContextID = 147
Begin VB.Menu menuRunListStandardCompositions
Caption = "&List Standard Compositions"
HelpContextID = 148
End
Begin VB.Menu menuRunListCurrentMACs
Caption = "List Current MACs"
HelpContextID = 149
End
Begin VB.Menu menuRunListCurrentAlphas
Caption = "List Current Alpha Factors"
End
Begin VB.Menu menuRunListAnalysisParameters
Caption = "List Analysis Parameters"
HelpContextID = 150
End
Begin VB.Menu menuRunSeparator1
Caption = "-"
End
Begin VB.Menu menuRunModelDetectionLimits
Caption = "&Model Detection Limits"
HelpContextID = 151
End
Begin VB.Menu menuRunCalculateElectronXrayRanges
Caption = "&Calculate Electron and Xray Ranges"
HelpContextID = 775
End
Begin VB.Menu menuRunCalculateTemperatureRise
Caption = "Calculate Sample Temperature Rise"
HelpContextID = 776
End
Begin VB.Menu menuRunSeparator2
Caption = "-"
End
Begin VB.Menu menuRunCalculateEffectiveTakeoff
Caption = "Calculate Effective Takeoff Angle K-ratios"
End
End
Begin VB.Menu menuOutput
Caption = "&Output"
HelpContextID = 153
Begin VB.Menu menuOutputLogWindow
Caption = "Log Window Font"
HelpContextID = 154
End
Begin VB.Menu menuOutputDebugMode
Caption = "Debug Mode"
HelpContextID = 155
End
Begin VB.Menu menuOutputVerboseMode
Caption = "Verbose Mode"
HelpContextID = 687
End
Begin VB.Menu menuOutputSeparator0
Caption = "-"
End
Begin VB.Menu menuOutputUseAutomaticFormatForResults
Caption = "Use Automatic Format For Results"
End
Begin VB.Menu menuOutputZAFEquationMode
Caption = "ZAF Equation Mode (1/A, 1+F, 1/S)"
HelpContextID = 777
End
Begin VB.Menu menuOutputSeparator1
Caption = "-"
End
Begin VB.Menu menuOutputExtendedFormat
Caption = "Extended Format"
HelpContextID = 156
End
Begin VB.Menu menuOutputSaveToDiskLog
Caption = "Save To Disk Log"
HelpContextID = 157
End
Begin VB.Menu menuViewDiskLog
Caption = "View Disk Log"
HelpContextID = 158
End
Begin VB.Menu menuOutputSeparator2
Caption = "-"
End
Begin VB.Menu menuOutputOpenLinkToExcel
Caption = "Open Link To Excel"
HelpContextID = 159
End
Begin VB.Menu menuOutputCloseLinkToExcel
Caption = "Close Link To Excel"
Checked = -1 'True
HelpContextID = 160
End
End
Begin VB.Menu menuHelp
Caption = "&Help"
HelpContextID = 161
Begin VB.Menu menuHelpAboutCalcZAF
Caption = "&About CalcZAF"
HelpContextID = 162
End
Begin VB.Menu menuHelpOnCalcZAF
Caption = "&Help on CalcZAF"
HelpContextID = 163
End
Begin VB.Menu menuHelpGettingStartedWithCalcZAF
Caption = "&Getting Started With CalcZAF"
End
Begin VB.Menu menuHelpSeparator1
Caption = "-"
End
Begin VB.Menu menuHelpUpdateCalcZAF
Caption = "&Update CalcZAF"
HelpContextID = 722
End
Begin VB.Menu menuHelpSeparator2
Caption = "-"
End
Begin VB.Menu menuHelpProbeSoftwareOnTheWeb
Caption = "&Probe Software On The Web"
HelpContextID = 778
End
Begin VB.Menu menuHelpProbeSoftwareUserForum
Caption = "&Connect To Probe Software User Forum"
End
End
End
Attribute VB_Name = "FormMAIN"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' (c) Copyright 1995-2024 by John J. Donovan
Option Explicit
Private Sub Form_Activate()
Static initialized As Integer
If Not DebugMode Then On Error Resume Next
' Initialize the global variables
If initialized = False Then
initialized = True
' Initialize the files
Call InitFiles
If ierror Then End
' Load the PROBEWIN.INI file
Call InitINI
If ierror Then End
' Initialize arrays
Call InitData
If ierror Then End
' Init ZAF arrays
Call ZAFInitZAF
If ierror Then Exit Sub
' Check if the standard database needs to be updated
Call StandardUpdateMDBFile(StandardDataFile$)
If ierror Then Exit Sub
' Debug mode is default for CalcZAF
RealTimeMode = False
DebugMode% = True
FormMAIN.menuOutputDebugMode.Checked = True
' Initialize the log window
FormMAIN.TimerLogWindow.Interval = Int(LogWindowInterval! * 1000)
' Init samples
Call CalcZAFInit
If ierror Then Exit Sub
' Show the element grid
FormZAF.Show vbModeless
Call CalcZAFLoad
If ierror Then Exit Sub
'Call CalcZAFConvertPouchouCSV ' test code
'Call EditConvertCSVToText(FormMAIN) ' test code
'Call EditConvertFFAST2Dat ' test code
Call InitWindow(Int(2), MDBUserName$, Me) ' to ensure default position gets saved
End If
End Sub
Private Sub Form_Load()
' Load FormMAIN for program CALCZAF
If Not DebugMode Then On Error Resume Next
Call InitWindow(Int(2), MDBUserName$, Me)
' Load form and application icon
Call MiscLoadIcon(FormMAIN)
' Check if program is already running
If app.PrevInstance Then
msg$ = "CALCZAF is already running, click OK, then type <ctrl> <esc> for the Task Manager and select CALCZAF.EXE from the Task List"
MsgBox msg$, vbOKOnly + vbExclamation, "CALCZAF"
End
End If
' Help file
FormMAIN.HelpContextID = IOGetHelpContextID("FormMAIN")
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Not DebugMode Then On Error Resume Next
Call ExcelCloseSpreadsheet(vbNullString, FormMAIN)
If ierror Then Exit Sub
Unload FormZAF
End Sub
Private Sub Form_Resize()
If Not DebugMode Then On Error Resume Next
Dim tempsize As Integer
' Make text box (Log Window) full size of window
FormMAIN.TextLog.Left = 0
If FormMAIN.ScaleWidth > 0 Then FormMAIN.TextLog.Width = FormMAIN.ScaleWidth
tempsize% = FormMAIN.ScaleHeight - FormMAIN.TextLog.Top - FormMAIN.StatusBarAuto.Height
If tempsize% > 0 Then FormMAIN.TextLog.Height = tempsize%
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not DebugMode Then On Error Resume Next
Call InitWindow(Int(1), MDBUserName$, Me)
' Disable timer
FormMAIN.TimerLogWindow.Enabled = False
End
End Sub
Private Sub menuAnalyticalAlphaFactors_Click()
If Not DebugMode Then On Error Resume Next
Call CalcZAFPlotAlphas
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalBinaryCalculationOptions_Click()
If Not DebugMode Then On Error Resume Next
' Load the options
Call CalcZAFBinaryLoad
If ierror Then Exit Sub
FormBINARY.Show vbModal
DoEvents
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensities_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the histogram options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate binary compositions
Call CalcZAFBinary(Int(0), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensities1_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate atomic first approximation
Call CalcZAFBinary(Int(1), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensities2_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate mass first approximation
Call CalcZAFBinary(Int(2), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensities3_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate electron first approximation
Call CalcZAFBinary(Int(3), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensitiesAllCorrections_Click()
If Not DebugMode Then On Error Resume Next
Dim itemp1 As Integer, itemp2 As Integer
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Calculate standard k-factors for all corrections and MAC files (single line, single file)
itemp1% = izaf%
itemp2% = MACTypeFlag%
Call CalcZAFBinary(Int(4), FormMAIN)
izaf% = itemp1%
MACTypeFlag% = itemp2%
If ierror Then Exit Sub
' Restore original standard k-factors
Call CalcZAFUpdateAllStdKfacs
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateBinaryIntensitiesAllCorrections2_Click()
If Not DebugMode Then On Error Resume Next
Dim itemp1 As Integer, itemp2 As Integer
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Calculate standard k-factors for all corrections and MAC files (all lines, multiple files)
itemp1% = izaf%
itemp2% = MACTypeFlag%
Call CalcZAFBinary(Int(5), FormMAIN)
izaf% = itemp1%
MACTypeFlag% = itemp2%
If ierror Then Exit Sub
' Restore original standard k-factors
Call CalcZAFUpdateAllStdKfacs
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateFirstApproximations1_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate first approximation
Call CalcZAFFirstApproximation(Int(1), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateFirstApproximations2_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate first approximation
Call CalcZAFFirstApproximation(Int(2), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateFirstApproximations3_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Load the options
Call CalcZAFHistogramLoad
If ierror Then Exit Sub
' Calculate standard k-factors
Call CalcZAFFirstApproximation(Int(3), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateStandardConcentrations_Click()
If Not DebugMode Then On Error Resume Next
' Close existing data file if necessary
Call CalcZAFImportClose
If ierror Then Exit Sub
FormMAIN.TextLog.Text = vbNullString
' Calculate compositions of standards and compare to published values
Call CalcZAFStandard(Int(0), FormMAIN)
If ierror Then Exit Sub
End Sub
Private Sub menuAnalyticalCalculateStandardConcentrationsAllCorrections_Click()