📄 frmparaview.frm
字号:
VERSION 5.00
Begin VB.Form frmParaView
BorderStyle = 1 'Fixed Single
Caption = "寻优微机参数浏览"
ClientHeight = 1395
ClientLeft = 4080
ClientTop = 3585
ClientWidth = 2580
Icon = "frmParaView.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1395
ScaleWidth = 2580
Begin VB.Timer Timer1
Interval = 2000
Left = 225
Top = 765
End
Begin VB.CommandButton cmdClose
Caption = "关闭&C"
Height = 375
Left = 1200
TabIndex = 3
Top = 960
Width = 1215
End
Begin VB.Label lblName
Alignment = 2 'Center
Caption = "吹风"
Height = 255
Index = 0
Left = 600
TabIndex = 2
Top = 120
Width = 615
End
Begin VB.Label lblID
Alignment = 1 'Right Justify
Caption = "1#炉"
Height = 255
Index = 0
Left = 0
TabIndex = 1
Top = 360
Width = 495
End
Begin VB.Label lblPara
Alignment = 2 'Center
BackColor = &H80000009&
BorderStyle = 1 'Fixed Single
Caption = "0"
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
ForeColor = &H00FF0000&
Height = 255
Index = 0
Left = 600
TabIndex = 0
Top = 360
Width = 615
End
End
Attribute VB_Name = "frmParaView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************湖南仪峰公司新模块化DCS组件*************************
'作者: 彭逢望,隆朋飞
'编写日期: 2004-6-15
'最后修改: 2004-9-25
'修改人: 彭逢望
'*****************************************************************
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
Dim RetVal As Long, i As Long, j As Long
RetVal = SetParent(Me.hWnd, frmMain.hWnd)
Me.Caption = "寻优微机参数浏览"
For i = 0 To StoveNumber + StoveNumberR - 1
If i <> 0 Then Load lblID(i)
With lblID(i)
.Top = lblID(0).Top + i * (lblID(0).Height)
If i < StoveNumber Then
.Caption = i + StoveStart & "#炉"
Else
.Caption = i - StoveNumber + StoveStartR & "#炉"
End If
.Visible = True
End With
Next
For i = 0 To paraNumber - 1
If i <> 0 Then Load lblName(i)
With lblName(i)
.Left = lblName(0).Left + i * lblName(0).Width
.Caption = ReadInIFiles("Parameter", "Name" & CStr(i), "吹风", iniPaths & "system.ini")
.Visible = True
End With
Next
For i = 0 To paraNumber - 1
For j = 0 To StoveNumber + StoveNumberR - 1
If j <> 0 Or i <> 0 Then
Load lblPara(i * (StoveNumber + StoveNumberR) + j)
End If
With lblPara(i * (StoveNumber + StoveNumberR) + j)
.Top = lblPara(0).Top + j * lblPara(0).Height
.Left = lblPara(0).Left + i * lblPara(0).Width
.Visible = True
If Stove(j).runstate = 1 Then
lblPara(j + i * (StoveNumber + StoveNumberR)).ForeColor = RGB(0, 0, 255)
Else
lblPara(j + i * (StoveNumber + StoveNumberR)).ForeColor = RGB(255, 0, 0)
End If
If j Mod 2 = 1 Then
.BackColor = &H8000000F
End If
End With
Next
Next
'加载实时参数值
For i = 0 To StoveNumber + StoveNumberR - 1
lblPara(i).Caption = Stove(i).CF_Control
lblPara(i + 1 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SC_Control
lblPara(i + 2 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XC_Control
lblPara(i + 3 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SXWD_Control
lblPara(i + 4 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XXWD_Control
lblPara(i + 5 * (StoveNumber + StoveNumberR)).Caption = Stove(i).Queue_Control
lblPara(i + 6 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SJN_Control
lblPara(i + 7 * (StoveNumber + StoveNumberR)).Caption = Stove(i).CycleTime
lblPara(i + 8 * (StoveNumber + StoveNumberR)).Caption = Stove(i).HS_Control
If paraNumber > 9 Then lblPara(i + 9 * (StoveNumber + StoveNumberR)).Caption = Stove(i).GL_Control
If paraNumber > 10 Then lblPara(i + 10 * (StoveNumber + StoveNumberR)).Caption = Stove(i).GL_Count
If paraNumber > 11 Then lblPara(i + 11 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XJN_Control
Next i
CmdClose.Top = lblPara(paraNumber * (StoveNumber + StoveNumberR) - 1).Top + lblPara(paraNumber * (StoveNumber + StoveNumberR) - 1).Height + 200
CmdClose.Left = lblPara(paraNumber * (StoveNumber + StoveNumberR) - 1).Left - 600
Me.Height = CmdClose.Top + CmdClose.Height + 420
Me.Width = CmdClose.Left + CmdClose.Width + 120
Me.Show
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Dim i As Long, j As Long
For i = 0 To StoveNumber + StoveNumberR - 1
lblPara(i).Caption = Stove(i).CF_Control
lblPara(i + 1 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SC_Control
lblPara(i + 2 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XC_Control
lblPara(i + 3 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SXWD_Control
lblPara(i + 4 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XXWD_Control
lblPara(i + 5 * (StoveNumber + StoveNumberR)).Caption = Stove(i).Queue_Control
lblPara(i + 6 * (StoveNumber + StoveNumberR)).Caption = Stove(i).SJN_Control
lblPara(i + 7 * (StoveNumber + StoveNumberR)).Caption = Stove(i).CycleTime
lblPara(i + 8 * (StoveNumber + StoveNumberR)).Caption = Stove(i).HS_Control
If paraNumber > 9 Then lblPara(i + 9 * (StoveNumber + StoveNumberR)).Caption = Stove(i).GL_Control
If paraNumber > 10 Then lblPara(i + 10 * (StoveNumber + StoveNumberR)).Caption = Stove(i).GL_Count
If paraNumber > 11 Then lblPara(i + 11 * (StoveNumber + StoveNumberR)).Caption = Stove(i).XJN_Control
For j = 0 To paraNumber - 1
If Stove(i).runstate = 1 Then
lblPara(i + j * (StoveNumber + StoveNumberR)).ForeColor = RGB(0, 0, 255)
Else
lblPara(i + j * (StoveNumber + StoveNumberR)).ForeColor = RGB(255, 0, 0)
End If
Next j
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -