⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formriqi.frm

📁 This is a boiler test system,has been use in factory
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Formall 
   BackColor       =   &H00FF8080&
   Caption         =   "Form2"
   ClientHeight    =   7170
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   10755
   FillColor       =   &H00C0FFC0&
   LinkTopic       =   "Form2"
   ScaleHeight     =   7170
   ScaleWidth      =   10755
   StartUpPosition =   3  '窗口缺省
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Bindings        =   "Formriqi.frx":0000
      Height          =   5295
      Left            =   1320
      TabIndex        =   0
      Top             =   1080
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   9340
      _Version        =   393216
      Rows            =   18
      Cols            =   113
      FixedRows       =   0
      FixedCols       =   0
      BackColor       =   16777215
      BackColorBkg    =   12632256
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FF8080&
      Caption         =   "全部数据显示"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   26.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3360
      TabIndex        =   1
      Top             =   240
      Width           =   3495
   End
   Begin VB.Menu exit12 
      Caption         =   "关闭"
   End
   Begin VB.Menu again 
      Caption         =   "刷新"
   End
End
Attribute VB_Name = "Formall"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

 Dim gConn As New ADODB.Connection '定义一个新的数据库连接,建立到数据源的连接
 Dim rs As New ADODB.Recordset
 Dim row As Integer

Private Sub again_Click()
MSFlexGrid1.TextMatrix(0, 0) = "日期"
MSFlexGrid1.TextMatrix(0, 1) = "蒸汽压力"
MSFlexGrid1.TextMatrix(0, 2) = "炉膛负压"
MSFlexGrid1.TextMatrix(0, 3) = "炉蒸汽流量"
MSFlexGrid1.TextMatrix(0, 4) = "给水流量"
MSFlexGrid1.TextMatrix(0, 5) = "炉引风转速"
MSFlexGrid1.TextMatrix(0, 6) = "炉鼓风转速"
MSFlexGrid1.TextMatrix(0, 7) = "炉排转速"
MSFlexGrid1.TextMatrix(0, 8) = "炉给水变频"
MSFlexGrid1.TextMatrix(0, 9) = "炉汽包水位"
MSFlexGrid1.TextMatrix(0, 10) = "引风机出口烟压"
MSFlexGrid1.TextMatrix(0, 11) = "鼓风机出口烟压"
MSFlexGrid1.TextMatrix(0, 12) = "炉除尘器出口烟压"
MSFlexGrid1.TextMatrix(0, 13) = "炉省煤气出口烟压"
MSFlexGrid1.TextMatrix(0, 14) = "炉除尘器出口烟温"
MSFlexGrid1.TextMatrix(0, 15) = "炉膛温度"
MSFlexGrid1.TextMatrix(0, 16) = "炉省煤气出口烟温"
MSFlexGrid1.TextMatrix(0, 17) = "炉蒸汽温度"
   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

row = 1
MSFlexGrid1.Rows = row
MSFlexGrid1.Cols = rs.Fields.Count
For j = 0 To rs.Fields.Count - 1
MSFlexGrid1.TextMatrix(0, j) = rs.Fields(j).Name
Next j
Do While Not rs.EOF
row = row + 1
MSFlexGrid1.Rows = row
For j = 0 To rs.Fields.Count - 1
If Not IsNull(rs.Fields(j).Value) Then
MSFlexGrid1.TextMatrix(row - 1, j) = rs.Fields(j).Value
End If
Next j
rs.MoveNext
Loop
End Sub

Private Sub exit12_Click()
Unload Me
End Sub

Private Sub Form_Load()
MSFlexGrid1.TextMatrix(0, 0) = "日期"
MSFlexGrid1.TextMatrix(0, 1) = "蒸汽压力"
MSFlexGrid1.TextMatrix(0, 2) = "炉膛负压"
MSFlexGrid1.TextMatrix(0, 3) = "炉蒸汽流量"
MSFlexGrid1.TextMatrix(0, 4) = "给水流量"
MSFlexGrid1.TextMatrix(0, 5) = "炉引风转速"
MSFlexGrid1.TextMatrix(0, 6) = "炉鼓风转速"
MSFlexGrid1.TextMatrix(0, 7) = "炉排转速"
MSFlexGrid1.TextMatrix(0, 8) = "炉给水变频"
MSFlexGrid1.TextMatrix(0, 9) = "炉汽包水位"
MSFlexGrid1.TextMatrix(0, 10) = "引风机出口烟压"
MSFlexGrid1.TextMatrix(0, 11) = "鼓风机出口烟压"
MSFlexGrid1.TextMatrix(0, 12) = "炉除尘器出口烟压"
MSFlexGrid1.TextMatrix(0, 13) = "炉省煤气出口烟压"
MSFlexGrid1.TextMatrix(0, 14) = "炉除尘器出口烟温"
MSFlexGrid1.TextMatrix(0, 15) = "炉膛温度"
MSFlexGrid1.TextMatrix(0, 16) = "炉省煤气出口烟温"
MSFlexGrid1.TextMatrix(0, 17) = "炉蒸汽温度"
   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

row = 1
MSFlexGrid1.Rows = row
MSFlexGrid1.Cols = rs.Fields.Count
For j = 0 To rs.Fields.Count - 1
MSFlexGrid1.TextMatrix(0, j) = rs.Fields(j).Name
Next j
Do While Not rs.EOF
row = row + 1
MSFlexGrid1.Rows = row
For j = 0 To rs.Fields.Count - 1
If Not IsNull(rs.Fields(j).Value) Then
MSFlexGrid1.TextMatrix(row - 1, j) = rs.Fields(j).Value
End If
Next j
rs.MoveNext
Loop

End Sub

Private Sub MSFlexGrid1_Click()

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -