📄 frmchange.frm
字号:
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 0
Left = 1080
TabIndex = 42
Top = 1050
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 11
Left = 1080
TabIndex = 41
Top = 4680
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 10
Left = 1080
TabIndex = 40
Top = 4335
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 16
Left = 3675
TabIndex = 39
Top = 2160
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 1
Left = 1080
TabIndex = 38
Top = 1380
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 5
Left = 1080
TabIndex = 37
Top = 2685
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 2
Left = 1080
TabIndex = 36
Top = 1710
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 4
Left = 1080
TabIndex = 35
Top = 2355
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 9
Left = 1080
TabIndex = 34
Top = 4005
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 3
Left = 1080
TabIndex = 33
Top = 2025
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 7
Left = 1080
TabIndex = 32
Top = 3330
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 6
Left = 1080
TabIndex = 31
Top = 2985
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackColor = &H00FFFFFF&
BackStyle = 0 'Transparent
Caption = "备用"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Index = 13
Left = 3675
TabIndex = 30
Top = 1050
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackColor = &H80000009&
BackStyle = 0 'Transparent
Caption = "备用"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Index = 15
Left = 3675
TabIndex = 29
Top = 1800
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackColor = &H80000009&
BackStyle = 0 'Transparent
Caption = "备用"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Index = 14
Left = 3675
TabIndex = 28
Top = 1440
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 8
Left = 1080
TabIndex = 27
Top = 3660
Width = 360
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备用"
Height = 180
Index = 12
Left = 1080
TabIndex = 26
Top = 5040
Width = 360
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "交接记录:"
Height = 180
Index = 4
Left = 2640
TabIndex = 6
Top = 2400
Width = 900
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Height = 195
Index = 5
Left = 0
TabIndex = 4
Top = 0
Width = 1095
End
Begin VB.Label lblTime
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
ForeColor = &H00FF0000&
Height = 285
Left = 480
TabIndex = 3
Top = 120
Width = 1695
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "本班交班时的重要数据:"
Height = 180
Index = 0
Left = 120
TabIndex = 1
Top = 600
Width = 1980
End
End
Attribute VB_Name = "frmChange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************湖南仪峰公司新模块化DCS组件*************************
'作者: 彭逢望,隆朋飞
'编写日期: 2004-6-15
'最后修改: 2004-9-25
'修改人: 彭逢望
'*****************************************************************
Option Explicit
'Dim Conn As New ADODB.Connection
'Dim Cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim strNumber As String
Dim TempDate As String, TempTime As String
Dim Fluxtemp(0 To 15) As Single
Dim Clcytemp(0 To 10) As Single
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim i%
Dim strSend As String
Dim blnAdd As Boolean
On Error Resume Next
' If Hour(Now) <> 7 And Hour(Now) <> 8 And Hour(Now) <> 15 And Hour(Now) <> 16 And Hour(Now) <> 23 And Hour(Now) <> 0 Then
' MsgBox "非换班时间!": Exit Sub
' End If
If cboClass.Text = "" Or cboClass.ListIndex < 0 Then
MsgBox "请选择接班班组的ID号!", vbOKOnly, "系统信息"
Exit Sub
End If
If IsAcess Then
Cmd.CommandText = "Select*from Change where WDate=CDATE('" & Date & "') order by WTime"
Else
Cmd.CommandText = "Select*from Change where WDate='" & Date & "' order by WTime"
If rs.State = 1 Then
rs.Close
End If
End If
rs.OPEN Cmd, , adOpenDynamic, adLockOptimistic
If cboClass.ListIndex + 1 = UserID Then
MsgBox "换班无效!"
Exit Sub
End If
rs.AddNew
rs("WDate") = TempDate
rs("WTime") = TempTime
rs("UserID") = UserID
strSend = "^" & UserID
For i = 0 To 16
rs("D" & i + 1) = Val(Text1(i).Text)
strSend = strSend & "^" & Text1(i).Text
Next
rs("D20") = Trim(Text2.Text)
strSend = strSend & "^" & Trim(Text2.Text)
rs.UpDate
rs.Close
Set rs = Nothing
If cboClass.ListIndex < 0 Then cboClass.ListIndex = 0
UserID = cboClass.ListIndex + 1
WritePrivateProfileString "Host", "UserID", CStr(UserID), iniPaths + "system.ini"
strSend = strSend & "^" & UserID
SynchroMsg strSend
frmMain.UserRefresh UserID
Unload Me
End Sub
Private Sub Form_Load()
Dim i, j As Long, TimeNum As Long, Daytemp As Long, lp_hand As Long
Dim NameNum As Long, str1 As String
On Error Resume Next
lp_hand = SetParent(Me.hWnd, frmMain.hWnd)
cboClass.AddItem Trim(Users(1).Name)
cboClass.AddItem Trim(Users(2).Name)
cboClass.AddItem Trim(Users(3).Name)
cboClass.AddItem Trim(Users(4).Name)
lblTime = Format(Time, "hh:mm:ss")
TempDate = Format(Date, "yyyy-mm-dd")
TempTime = Format(Time, "hh:mm:ss")
If Hour(Time) >= 0 And Hour(Time) <= 8 Then
TimeNum = 0
ElseIf Hour(Time) >= 9 And Hour(Time) <= 15 Then
TimeNum = 8
ElseIf Hour(Time) >= 16 And Hour(Time) <= 23 Then
TimeNum = 16
End If
NameNum = Val(ReadInIFiles("Report2", "Number", "1", iniPaths + "Report.ini"))
For i = 0 To 16
str1 = Trim(ReadInIFiles("Report2", "EnTag" & i, "0", iniPaths + "Report.ini"))
If i < NameNum Then
Label5(i).Caption = Trim(ReadInIFiles("Report2", "Name" & i, "备用", iniPaths + "Report.ini"))
Text1(i).Locked = CBool(Mid(str1, 1, 1))
If Text1(i).Locked = True Then
j = Val(Mid(str1, 2, Len(str1) - 1))
Text1(i).Text = Signal(j).CalValue
End If
Else
Label5(i).Caption = "备用/%"
Label5(i).Enabled = False
Text1(i).Enabled = False
End If
Next
' Clcytemp(0) = Flux(10) - Fluxtemp(10) + Flux(11) - Fluxtemp(11)
' Clcytemp(2) = Flux(0) - Fluxtemp(0) + Flux(1) - Fluxtemp(1) + Flux(2) - Fluxtemp(2) + Flux(3) - Fluxtemp(3) + Flux(8) - Fluxtemp(8)
' Clcytemp(3) = Flux(4) - Fluxtemp(4) + Flux(5) - Fluxtemp(5) + Flux(6) - Fluxtemp(6) + Flux(7) - Fluxtemp(7)
' Clcytemp(4) = Flux(12) - Fluxtemp(12) + Flux(13) - Fluxtemp(13) + Flux(14) - Fluxtemp(14)
' Text1(1) = Clcytemp(0)
' Text1(13) = Clcytemp(2)
' Text1(14) = Clcytemp(3)
' Text1(15) = Clcytemp(4)
End Sub
Private Sub cmdClcy_Click()
' CmdOK.Enabled = True
' Clcytemp(1) = FormatV(Clcytemp(0) - Val(Text1(2)))
' Text1(0) = Clcytemp(1)
' Clcytemp(4) = FormatV(Clcytemp(2) - Clcytemp(3))
' Text1(6) = Clcytemp(4)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmChange = Nothing
End Sub
Private Sub Text1_Change(Index As Integer)
If IsNumeric(Text1(Index).Text) = False Then
Text1(Index) = 0
End If
End Sub
Private Sub Text1_DblClick(Index As Integer)
If Not Text1(Index).Locked Then
Set ControlLink = Text1(Index)
frmDataIn.txtNumber = Text1(Index).Text
frmDataIn.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -