📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00FF8080&
Caption = "Form1"
ClientHeight = 8340
ClientLeft = 165
ClientTop = 855
ClientWidth = 10470
ClipControls = 0 'False
FillColor = &H0080C0FF&
ForeColor = &H00000000&
LinkTopic = "Form1"
ScaleHeight = 8340
ScaleWidth = 10470
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text18
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 270
Left = 1920
TabIndex = 35
Top = 120
Width = 3135
End
Begin VB.Timer Timer2
Interval = 2000
Left = 7920
Top = 7560
End
Begin VB.Timer Timer1
Interval = 1000
Left = 6960
Top = 7560
End
Begin VB.TextBox Text17
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 8280
TabIndex = 33
Top = 6840
Width = 735
End
Begin VB.TextBox Text16
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 8160
TabIndex = 19
Top = 5880
Width = 855
End
Begin VB.TextBox Text15
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 8160
TabIndex = 18
Top = 4920
Width = 855
End
Begin VB.TextBox Text14
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 8040
TabIndex = 17
Top = 4080
Width = 975
End
Begin VB.TextBox Text13
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 8040
TabIndex = 16
Top = 3240
Width = 855
End
Begin VB.TextBox Text12
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 7920
TabIndex = 15
Top = 2400
Width = 855
End
Begin VB.TextBox Text11
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 7920
TabIndex = 14
Top = 1680
Width = 855
End
Begin VB.TextBox Text10
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 7920
TabIndex = 13
Top = 960
Width = 855
End
Begin VB.TextBox Text9
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3480
TabIndex = 12
Top = 6960
Width = 975
End
Begin VB.TextBox Text8
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3480
TabIndex = 11
Top = 6120
Width = 855
End
Begin VB.TextBox Text7
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3360
TabIndex = 10
Top = 5160
Width = 855
End
Begin VB.TextBox Text6
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3360
TabIndex = 9
Top = 4200
Width = 855
End
Begin VB.TextBox Text5
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3360
TabIndex = 8
Top = 3360
Width = 855
End
Begin VB.TextBox Text4
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3360
TabIndex = 7
Top = 2640
Width = 855
End
Begin VB.TextBox Text3
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3240
TabIndex = 6
Top = 1920
Width = 855
End
Begin VB.TextBox Text2
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3240
TabIndex = 5
Top = 1200
Width = 855
End
Begin VB.TextBox Text1
BackColor = &H00FFC0C0&
ForeColor = &H000000FF&
Height = 375
Left = 3240
TabIndex = 2
Top = 600
Width = 855
End
Begin VB.Label Label19
BackColor = &H00FF8080&
Caption = "当前时间"
Height = 375
Left = 360
TabIndex = 36
Top = 120
Width = 975
End
Begin VB.Label Label18
BackColor = &H00FF8080&
Caption = "炉蒸汽温度"
Height = 255
Left = 6240
TabIndex = 34
Top = 6960
Width = 1095
End
Begin VB.Label Label17
BackColor = &H00FF8080&
Caption = "炉省煤气出口烟压"
Height = 375
Left = 6120
TabIndex = 32
Top = 5880
Width = 1455
End
Begin VB.Label Label16
BackColor = &H00FF8080&
Caption = "炉省煤气出口烟压"
Height = 255
Left = 5880
TabIndex = 31
Top = 3240
Width = 1455
End
Begin VB.Label Label15
BackColor = &H00FF8080&
Caption = "炉除尘器出口烟温"
Height = 255
Left = 6000
TabIndex = 30
Top = 4200
Width = 1455
End
Begin VB.Label Label14
BackColor = &H00FF8080&
Caption = "炉除尘器出口烟压"
Height = 255
Left = 5880
TabIndex = 29
Top = 2400
Width = 1455
End
Begin VB.Label Label13
BackColor = &H00FF8080&
Caption = "鼓风机出口风压"
Height = 255
Left = 5880
TabIndex = 28
Top = 1680
Width = 1335
End
Begin VB.Label Label12
BackColor = &H00FF8080&
Caption = "引风机出口烟压"
Height = 255
Left = 5880
TabIndex = 27
Top = 960
Width = 1335
End
Begin VB.Label Label11
BackColor = &H00FF8080&
Caption = "炉鼓风转速"
Height = 255
Left = 1800
TabIndex = 26
Top = 4320
Width = 975
End
Begin VB.Label Label10
BackColor = &H00FF8080&
Caption = "给水流量"
Height = 255
Left = 1800
TabIndex = 25
Top = 2760
Width = 855
End
Begin VB.Label Label9
BackColor = &H00FF8080&
Caption = "炉给水变频"
Height = 255
Left = 1920
TabIndex = 24
Top = 6240
Width = 975
End
Begin VB.Label Label8
BackColor = &H00FF8080&
Caption = "炉排转速"
Height = 255
Left = 1800
TabIndex = 23
Top = 5160
Width = 975
End
Begin VB.Label Label7
BackColor = &H00FF8080&
Caption = "炉引风转速"
Height = 255
Left = 1800
TabIndex = 22
Top = 3480
Width = 1095
End
Begin VB.Label Label6
BackColor = &H00FF8080&
Caption = "炉蒸汽流量"
Height = 255
Left = 1680
TabIndex = 21
Top = 2040
Width = 975
End
Begin VB.Label Label5
BackColor = &H00FF8080&
Caption = "炉膛负压"
Height = 255
Left = 1800
TabIndex = 20
Top = 1200
Width = 855
End
Begin VB.Label Label4
BackColor = &H00FF8080&
Caption = "炉汽包水位"
Height = 255
Left = 1800
TabIndex = 4
Top = 7080
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00FF8080&
Caption = "蒸汽压力"
Height = 255
Left = 1800
TabIndex = 3
Top = 720
Width = 855
End
Begin VB.Label Label2
BackColor = &H00FF8080&
Caption = "炉膛温度"
Height = 255
Left = 6240
TabIndex = 1
Top = 5040
Width = 735
End
Begin VB.Label Label1
BackColor = &H00FF8080&
Caption = "当前状态"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 0
Top = 600
Width = 855
End
Begin VB.Menu exit11
Caption = "关闭"
End
Begin VB.Menu chakan
Caption = "查看历史记录"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim gConn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim SQL1 As String
Private Sub Command1_Click()
Formdatabase.Show
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub chakan_Click()
Forminter.Show
End Sub
Private Sub exit11_Click()
Unload Me
End Sub
Private Sub Timer1_Timer()
Text18.Text = Now
Text1.Text = PvtAI(0)
Text2.Text = PvtAI(1)
Text3.Text = PvtAI(2)
Text4.Text = PvtAI(3)
Text5.Text = PvtAI(4)
Text6.Text = PvtAI(5)
Text7.Text = PvtAI(6)
Text8.Text = PvtAI(7)
Text9.Text = PvtAI(8)
Text10.Text = PvtAI(9)
Text11.Text = PvtAI(10)
Text12.Text = PvtAI(11)
Text13.Text = PvtAI(12)
Text14.Text = PvtAI(13)
Text15.Text = PvtAI(14)
Text16.Text = PvtAI(15)
Text17.Text = PvtAI(16)
End Sub
Private Sub Timer2_Timer()
Set gConn = New ADODB.Connection '定义一个新的数据库连接,建立到数据源的连接
Set rs = New ADODB.Recordset
gConn.ConnectionString = "DSN=guolu;UID=sa;PWD=sa"
gConn.Open
rs.Open "select * from wln", gConn, adOpenKeyset, adLockOptimistic
SQL1 = "INSERT INTO wln VALUES('" & Trim(Text18.Text) & "','" & Trim(Text1.Text) & "','" & Trim(Text2.Text) & "','" & Trim(Text3.Text) & "','" & Trim(Text4.Text) & "','" & Trim(Text5.Text) & "','" & Trim(Text6.Text) & "','" & Trim(Text7.Text) & "','" & Trim(Text8.Text) & "','" & Trim(Text9.Text) & "','" & Trim(Text10.Text) & "','" & Trim(Text11.Text) & "','" & Trim(Text12.Text) & "','" & Trim(Text13.Text) & "','" & Trim(Text14.Text) & "','" & Trim(Text15.Text) & "','" & Trim(Text16.Text) & "','" & Trim(Text17.Text) & "')"
gConn.Execute SQL1
rs.Update
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -