📄 fyf1tlfrm.frm
字号:
VERSION 5.00
Begin VB.Form fyftlfrm
BorderStyle = 5 'Sizable ToolWindow
Caption = "设定精酯量窗口"
ClientHeight = 1584
ClientLeft = 48
ClientTop = 216
ClientWidth = 2784
ClipControls = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1584
ScaleWidth = 2784
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox Text1
Height = 336
Left = 816
TabIndex = 0
Text = "0"
Top = 582
Width = 1092
End
Begin VB.CommandButton Command1
Caption = "确定&O"
Height = 320
Left = 384
MouseIcon = "fyf1tlfrm.frx":0000
MousePointer = 99 'Custom
TabIndex = 1
Top = 1152
Width = 732
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消&C"
Height = 320
Left = 1764
MouseIcon = "fyf1tlfrm.frx":0152
MousePointer = 99 'Custom
TabIndex = 2
Top = 1152
Width = 732
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入精酯量(kg):"
Height = 180
Left = 384
TabIndex = 3
Top = 192
Width = 1524
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 1572
Left = 5
Top = 0
Width = 2772
End
End
Attribute VB_Name = "fyftlfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private mvarindex As Integer
Private mblnyjaZhuiJia As Boolean
Private mXiuZhengHeight As Single
Private Sub Command1_Click()
On Error Resume Next
'*****************************
'在连续记录中记录修正投料信息
'*****************************
If Me.IsZhuiJia Then
mXiuZhengHeight = gsngJZToYJARatio * CSng(Text1.Text)
If (gjlgStartYewei(mvarindex) + mXiuZhengHeight) >= gjlgYeWei(mvarindex) Then
With mainfrm
Select Case mvarindex
Case 1
Call A_out(.fyf1_Control.tlfBaseAddress, .fyf1_Control.tlfChannel, 0, 0)
gintkdSheDing(1) = 0
Case 2
Call A_out(.fyf2_Control.tlfBaseAddress, .fyf2_Control.tlfChannel, 0, 0)
gintkdSheDing(2) = 0
Case 3
Call A_out(.fyf3_Control.tlfBaseAddress, .fyf3_Control.tlfChannel, 0, 0)
gintkdSheDing(3) = 0
End Select
End With
Call mainfrm.TouLiaoWanBi(mvarindex)
Call Inform(12)
Exit Sub
Else
gJingZhiLiang(Me.Index) = CSng(Text1.Text)
gyjaTouLiaoLiang(Me.Index) = gsngJZToYJARatio * gJingZhiLiang(Me.Index)
With mainfrm
Select Case Me.Index
Case 1
.fyf1_Control.yjatlLiang = gyjaTouLiaoLiang(1)
Case 2
.fyf2_Control.yjatlLiang = gyjaTouLiaoLiang(2)
Case 3
.fyf3_Control.yjatlLiang = gyjaTouLiaoLiang(3)
End Select
End With
With Continousrs(Me.Index)
gstrUserName = CStr(Me.Index) + "#反应釜修正投料"
.AddNew
.Fields("riqi") = Date
.Fields("currenttime") = Time
.Fields("fyfwendu") = gfyfWenDu(Me.Index)
.Fields("jlgyewei") = gjlgYeWei(Me.Index)
.Fields("tlfkaidu") = gtlfaKaiDu(Me.Index)
.Fields("yjaliuliang") = gyjaLiuLiang(Me.Index)
.Fields("lqyswendu") = glqysWenDu
.Fields("note") = "修正投料"
.Update
End With
With Batchlsrs(Me.Index)
.MoveLast
.Edit
.Fields("yjatouliaoliang") = gyjaTouLiaoLiang(Me.Index)
.Update
End With
End If
Else
zkhmfrm.Command2(Me.Index - 1).Enabled = True
gJingZhiLiang(Me.Index) = CSng(Text1.Text)
gyjaTouLiaoLiang(Me.Index) = gsngJZToYJARatio * gJingZhiLiang(Me.Index)
'*******************************
'为module_Control的实例赋属性值:
'一甲胺投料量、计量罐初始液位
'*******************************
With mainfrm
Select Case Me.Index
Case 1
.fyf1_Control.jlgcsYeWei = .fyf1_jlgYeWei.Value
gjlgStartYewei(1) = .fyf1_jlgYeWei.Value
.fyf1_Control.yjatlLiang = gyjaTouLiaoLiang(1)
.fyf1_Control.jlgjsYeWei = .fyf1_Control.jlgcsYeWei + gyjaTouLiaoLiang(1)
gjlgEndYewei(1) = .fyf1_Control.jlgjsYeWei
Case 2
.fyf2_Control.jlgcsYeWei = .fyf2_jlgYeWei.Value
gjlgStartYewei(2) = .fyf2_jlgYeWei.Value
.fyf2_Control.yjatlLiang = gyjaTouLiaoLiang(2)
.fyf2_Control.jlgjsYeWei = .fyf2_Control.jlgcsYeWei + gyjaTouLiaoLiang(2)
gjlgEndYewei(2) = .fyf2_Control.jlgjsYeWei
Case 3
.fyf3_Control.jlgcsYeWei = .fyf3_jlgYeWei.Value
gjlgStartYewei(3) = .fyf3_jlgYeWei.Value
.fyf3_Control.yjatlLiang = gyjaTouLiaoLiang(3)
.fyf3_Control.jlgjsYeWei = .fyf3_Control.jlgcsYeWei + gyjaTouLiaoLiang(3)
gjlgEndYewei(3) = .fyf3_Control.jlgjsYeWei
End Select
End With
Call Inform(mvarindex)
End If
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
'**********************
'窗体属性: 反应釜号
'**********************
Public Property Let Index(ByVal vData As Single)
mvarindex = vData
End Property
Public Property Get Index() As Single
Index = mvarindex
End Property
'**********************
'窗体属性: 是投料修正
'**********************
Public Property Let IsZhuiJia(ByVal vData As Boolean)
mblnyjaZhuiJia = vData
End Property
Public Property Get IsZhuiJia() As Boolean
IsZhuiJia = mblnyjaZhuiJia
End Property
Private Sub Text1_GotFocus()
Call GotFocusAgain(Text1)
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
If KeyCode = vbKeyReturn Then Call Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -