?? form2.frm
字號(hào):
Width = 5775
_ExtentX = 10186
_ExtentY = 2990
_Version = 393216
AllowUpdate = -1 'True
DefColWidth = 54
HeadLines = 1
RowHeight = 13
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "@宋體"
Size = 9.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "@宋體"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label12
Caption = "產(chǎn)品型號(hào):"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 1080
TabIndex = 68
Top = 480
Width = 975
End
Begin VB.Label Label25
AutoSize = -1 'True
Caption = "請(qǐng)輸入數(shù)據(jù)的起始點(diǎn)與結(jié)束點(diǎn):"
Height = 195
Left = -74640
TabIndex = 59
Top = 600
Width = 2520
End
Begin VB.Label Label24
AutoSize = -1 'True
Caption = "起始點(diǎn):"
Height = 195
Left = -74640
TabIndex = 58
Top = 960
Width = 720
End
Begin VB.Label Label23
AutoSize = -1 'True
Caption = "結(jié)束點(diǎn):"
Height = 195
Left = -72840
TabIndex = 57
Top = 960
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "最大值:"
Height = 195
Index = 4
Left = -74700
TabIndex = 56
Top = 1560
Width = 720
End
Begin VB.Line Line4
BorderColor = &H80000005&
BorderWidth = 2
X1 = -74880
X2 = -70770
Y1 = 1380
Y2 = 1380
End
Begin VB.Line Line3
BorderColor = &H80000006&
X1 = -74880
X2 = -70770
Y1 = 1380
Y2 = 1380
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "最小值:"
Height = 195
Index = 1
Left = -72840
TabIndex = 55
Top = 1560
Width = 720
End
Begin VB.Label CurMAX
AutoSize = -1 'True
Height = 195
Left = -73800
TabIndex = 54
Top = 1560
Width = 45
End
Begin VB.Label CurMIN
AutoSize = -1 'True
Height = 195
Left = -71880
TabIndex = 53
Top = 1560
Width = 45
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "差值:"
Height = 195
Index = 2
Left = -74520
TabIndex = 52
Top = 2040
Width = 540
End
Begin VB.Label CurDIFF
AutoSize = -1 'True
Height = 195
Left = -73800
TabIndex = 51
Top = 2040
Width = 45
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "平均值:"
Height = 195
Index = 3
Left = -72840
TabIndex = 50
Top = 2040
Width = 720
End
Begin VB.Label CurAVG
AutoSize = -1 'True
Height = 195
Left = -71880
TabIndex = 49
Top = 2040
Width = 45
End
End
End
Attribute VB_Name = "fcontrol"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If MsgBox("你確認(rèn)刪除這個(gè)產(chǎn)品嗎?", vbOKCancel + vbInformation, "提示----") = vbCancel Then
Exit Sub
End If
On Error Resume Next
Adodc2.Recordset.Delete
Adodc2.Recordset.Update
adoname.Recordset.Update
adoname.Refresh
End Sub
Private Sub Command6_Click()
End Sub
Private Sub Command2_Click()
If Adodc2.Recordset.Fields("hh") < Adodc2.Recordset.Fields("hl") Or Adodc2.Recordset.Fields("hl") < Adodc2.Recordset.Fields("lo") Or Adodc2.Recordset.Fields("lo") < Adodc2.Recordset.Fields("ll") Then
MsgBox "你輸入的數(shù)據(jù)不正確!請(qǐng)重新檢查!(必須滿足:Hh>Hl>Lo>Ll)", vbCritical + vbInformation, "提示"
Exit Sub
End If
Adodc2.Recordset.Update
adoname.Recordset.Update
adoname.Refresh
End Sub
Private Sub Command3_Click()
On Error Resume Next
If DataCombo2.Text = "" Or IsNumeric(tpyramidal.Text) = False Or IsNumeric(tpyramidal1.Text) = False Or IsNumeric(tpyu.Text) = False Or IsNumeric(tpyu.Text) = False Or Val(tpyu.Text) < Val(tpyd.Text) Then
MsgBox "你輸入的錐度數(shù)據(jù)不完全!請(qǐng)重新檢查!", vbCritical + vbInformation, "提示"
Exit Sub
End If
Adodc1.RecordSource = "select * from putout where name='" & Trim(DataCombo2.Text) & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.Fields("name") = DataCombo2.Text
Adodc1.Recordset.Fields("pyramidal") = tpyramidal.Text
Adodc1.Recordset.Fields("pyramidal1") = tpyramidal1.Text
Adodc1.Recordset.Fields("pyu") = tpyu.Text
Adodc1.Recordset.Fields("pyd") = tpyd.Text
Adodc1.Recordset.Update
Adodc1.Refresh
Else
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("name") = DataCombo2.Text
Adodc1.Recordset.Fields("pyramidal") = tpyramidal.Text
Adodc1.Recordset.Fields("pyramidal1") = tpyramidal1.Text
Adodc1.Recordset.Fields("pyu") = tpyu.Text
Adodc1.Recordset.Fields("pyd") = tpyd.Text
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "---增加測(cè)量點(diǎn)成功!", vbInformation + vbInformation, "提示"
End If
adoname.Recordset.Update
adoname.Refresh
End Sub
Private Sub Command4_Click()
If MsgBox("你確認(rèn)刪除這個(gè)產(chǎn)品嗎?", vbOKCancel + vbInformation, "提示----") = vbCancel Then
Exit Sub
End If
Adodc1.RecordSource = "select * from measure where name='" & Trim(DataCombo2.Text) & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
MsgBox "請(qǐng)先刪除產(chǎn)品的測(cè)量點(diǎn)數(shù)據(jù)!", vbOKOnly + vbInformation, "提示---"
Else
Adodc1.RecordSource = "select * from putout where name='" & Trim(DataCombo2.Text) & "'"
Adodc1.Refresh
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
Adodc1.Refresh
adoname.Refresh
DataCombo2.Text = ""
End If
End Sub
Private Sub Command5_Click()
Adodc2.Recordset.AddNew
Adodc2.Recordset.Fields("name") = DataCombo2.Text
End Sub
Private Sub Command7_Click()
Dim combotext As String
'On Error Resume Next '在control中增加一項(xiàng)如果有則修改,
If IsNumeric(tout1.Text) = False Or IsNumeric(tout2.Text) = False Or IsNumeric(tout3.Text) = False Or IsNumeric(tout4.Text) = False Or IsNumeric(tout5.Text) = False Or IsNumeric(rout1.Text) = False Or IsNumeric(tfat.Text) = False Or IsNumeric(trade.Text) = False Or IsNumeric(tbat.Text) = False Then
MsgBox "你輸入的參數(shù)數(shù)據(jù)不完全!請(qǐng)重新檢查!", vbCritical + vbInformation, "提示"
Exit Sub
End If
adosyscontrol.Recordset.Update
End Sub
Private Sub Command9_Click()
'寫入數(shù)據(jù)個(gè)數(shù)DM-------0_4+50+200-202
frmmain.com1.Output = "WRS" & Space(1) & "DM" & 0 & Space(1) & 5 & Space(1) & Val(adosyscontrol.Recordset.Fields("out1")) & Space(1) & Val(adosyscontrol.Recordset.Fields("out2")) & Space(1) & Val(adosyscontrol.Recordset.Fields("out3")) & Space(1) & Val(adosyscontrol.Recordset.Fields("out4")) & Space(1) & Val(adosyscontrol.Recordset.Fields("out5")) & vbCr
frmmain.com1.Output = "WRS" & Space(1) & "DM" & 200 & Space(1) & 3 & Space(1) & Val(adosyscontrol.Recordset.Fields("brade")) & Space(1) & Val(adosyscontrol.Recordset.Fields("bat")) & Space(1) & Val(adosyscontrol.Recordset.Fields("fat")) & vbCr
frmmain.com1.Output = "WR" & Space(1) & "DM" & 50 & Space(1) & Val(adosyscontrol.Recordset.Fields("rade")) & vbCr
End Sub
Private Sub DataCombo2_Change()
On Error Resume Next
Adodc1.RecordSource = "select * from putout where name='" & Trim(DataCombo2.Text) & "'"
Adodc1.Refresh
tpyramidal.Text = ""
tpyramidal1.Text = ""
tpyu.Text = ""
tpyd.Text = ""
tpyramidal.Text = Adodc1.Recordset.Fields("pyramidal")
tpyramidal1.Text = Adodc1.Recordset.Fields("pyramidal1")
tpyu.Text = Adodc1.Recordset.Fields("pyu")
tpyd.Text = Adodc1.Recordset.Fields("pyd")
Adodc2.RecordSource = "select * from measure where name='" & Trim(DataCombo2.Text) & "'"
Adodc2.Refresh
DataCombo1.Text = "請(qǐng)選擇測(cè)量點(diǎn)-" & "SUM(" & Adodc2.Recordset.RecordCount & ")"
Combo2.Text = ""
fcontrol.Caption = DataCombo2.Text & "-參數(shù)設(shè)置--"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.Adodc1.RecordSource = "select * from putout"
frmmain.Adodc1.Refresh
frmmain.DataCombo1.Refresh
End Sub
Private Sub Timer1_Timer()
'frmmain.com1.Output = "RD" & Space(1) & "CM2050" & vbCr
'DigitalY.Digital = WaitRS(frmmain.com1, vbCrLf, 50)
frmmain.com1.Output = "RD" & Space(1) & "CM2020" & vbCr
TXX.Caption = WaitRS(frmmain.com1, vbCrLf, 50)
End Sub
Private Sub tp1_Change()
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -