📄 formsummary.frm
字号:
VERSION 5.00
Begin VB.Form formSummary
BackColor = &H8000000A&
BorderStyle = 3 'Fixed Dialog
Caption = "Summary"
ClientHeight = 2865
ClientLeft = 45
ClientTop = 330
ClientWidth = 4815
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2865
ScaleWidth = 4815
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdCalculate
Caption = "Calculate"
Height = 375
Left = 1560
TabIndex = 10
Top = 120
Width = 1335
End
Begin VB.Label lblStatus
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 21
Top = 2400
Width = 1095
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "CPk :"
Height = 195
Left = 2880
TabIndex = 20
Top = 2040
Width = 390
End
Begin VB.Label lblCPk
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3360
TabIndex = 19
Top = 2040
Width = 855
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "CPl :"
Height = 195
Left = 2880
TabIndex = 18
Top = 1680
Width = 330
End
Begin VB.Label lblCPl
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3360
TabIndex = 17
Top = 1680
Width = 855
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "CPu :"
Height = 195
Left = 2880
TabIndex = 16
Top = 1320
Width = 390
End
Begin VB.Label lblCPu
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3360
TabIndex = 15
Top = 1320
Width = 855
End
Begin VB.Label lblLSL
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3360
TabIndex = 14
Top = 960
Width = 855
End
Begin VB.Label lblUSL
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3360
TabIndex = 13
Top = 600
Width = 855
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "Lower Spec. Limit :"
Height = 195
Left = 1920
TabIndex = 12
Top = 960
Width = 1350
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Upper Spec. Limit :"
Height = 195
Left = 1920
TabIndex = 11
Top = 600
Width = 1350
End
Begin VB.Label lblMin
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 9
Top = 2040
Width = 855
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Min :"
Height = 195
Left = 240
TabIndex = 8
Top = 2040
Width = 345
End
Begin VB.Label lblMax
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 7
Top = 1680
Width = 855
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "Max :"
Height = 195
Left = 240
TabIndex = 6
Top = 1680
Width = 390
End
Begin VB.Label lblStdev
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 5
Top = 1320
Width = 855
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Stdev :"
Height = 195
Left = 120
TabIndex = 4
Top = 1320
Width = 510
End
Begin VB.Label lblMean
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 3
Top = 960
Width = 855
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Mean :"
Height = 195
Left = 120
TabIndex = 2
Top = 960
Width = 495
End
Begin VB.Label lblCount
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 1
Top = 600
Width = 855
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Count :"
Height = 195
Left = 120
TabIndex = 0
Top = 600
Width = 510
End
End
Attribute VB_Name = "formSummary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim WithEvents CpkStat As Stat
Attribute CpkStat.VB_VarHelpID = -1
Private Sub cmdCalculate_Click()
With CpkStat
.Calculate
lblCount.Caption = .Count
lblMean.Caption = Format(.Mean, "0.0")
lblStdev.Caption = Format(.Stdev, "0.0")
lblMax.Caption = Format(.Max, "0.0")
lblMin.Caption = Format(.Min, "0.0")
lblCPu.Caption = Format(.CPu, "0.0")
lblCPl.Caption = Format(.CPl, "0.0")
lblCPk.Caption = Format(.CPk, "0.0")
End With
End Sub
Private Sub CpkStat_CPkState(Accepted As Boolean)
If Accepted Then
lblStatus.ForeColor = RGB(0, 0, 255)
lblStatus.Caption = "GOOD"
Else
lblStatus.ForeColor = RGB(255, 0, 0)
lblStatus.Caption = "BAD"
End If
End Sub
Private Sub Form_Load()
prtCPk.mnuSummary.Enabled = False
Set CpkStat = New Stat
lblUSL.Caption = USL
lblLSL.Caption = LSL
cmdCalculate_Click
End Sub
Private Sub Form_Unload(Cancel As Integer)
prtCPk.mnuSummary.Enabled = True
Set CpkStat = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -