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

📄 frmmain.frm

📁 VB城市排水系统
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmMain.frx":3F42
               Key             =   "open"
            EndProperty
         EndProperty
      End
   End
   Begin MSComctlLib.ImageList imlToolbarIcons 
      Left            =   1710
      Top             =   6300
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   14
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":403C
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4CBE
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":5910
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":6562
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":71B4
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":7F4E
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":8CA0
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":98F2
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":A644
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":B396
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":C0E8
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":CD3A
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":D98C
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":E5DE
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView tvTreeView 
      Height          =   4320
      Left            =   0
      TabIndex        =   6
      Top             =   1890
      Width           =   2970
      _ExtentX        =   5239
      _ExtentY        =   7620
      _Version        =   393217
      HideSelection   =   0   'False
      Style           =   7
      HotTracking     =   -1  'True
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1305
      Top             =   5580
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":F230
            Key             =   "closed"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":F32A
            Key             =   "leaf"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":F424
            Key             =   "open"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   6315
      Left            =   3465
      TabIndex        =   19
      Top             =   1035
      Width           =   9105
      _ExtentX        =   16060
      _ExtentY        =   11139
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   2
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "实时监控"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "历史数据分析"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView TreeView1 
      Height          =   4320
      Left            =   0
      TabIndex        =   20
      Top             =   1980
      Width           =   2970
      _ExtentX        =   5239
      _ExtentY        =   7620
      _Version        =   393217
      HideSelection   =   0   'False
      Style           =   7
      HotTracking     =   -1  'True
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
   Begin MSComctlLib.TabStrip TabStrip2 
      Height          =   4245
      Left            =   -180
      TabIndex        =   21
      Top             =   1980
      Width           =   2985
      _ExtentX        =   5265
      _ExtentY        =   7488
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   2
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "按行业"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "按地区"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
   Begin VB.Label Label8 
      Caption         =   "Label7"
      Height          =   285
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   1860
   End
   Begin VB.Line Line3 
      BorderColor     =   &H8000000A&
      BorderWidth     =   3
      X1              =   0
      X2              =   8160
      Y1              =   0
      Y2              =   0
   End
   Begin VB.Image imgSplitter 
      Height          =   4785
      Left            =   3015
      MousePointer    =   9  'Size W E
      Top             =   1485
      Width           =   150
   End
   Begin VB.Menu mnuFile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuFilePrint 
         Caption         =   "打印(&P)..."
      End
      Begin VB.Menu mnuFileBar5 
         Caption         =   "-"
      End
      Begin VB.Menu mnuFileClose 
         Caption         =   "关闭(&C)"
      End
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "编辑(&E)"
      Begin VB.Menu mnufind 
         Caption         =   "查找(&F)"
      End
      Begin VB.Menu mnudo 
         Caption         =   "操作(&D)"
      End
   End
   Begin VB.Menu mnutool 
      Caption         =   "系统维护(&S)"
      Begin VB.Menu mnuset 
         Caption         =   "设置"
      End
      Begin VB.Menu mnupwd 
         Caption         =   "用户密码(&W)"
      End
   End
   Begin VB.Menu mnuView 
      Caption         =   "视图(&V)"
      Begin VB.Menu mnuViewToolbar 
         Caption         =   "工具栏(&T)"
         Checked         =   -1  'True
      End
      Begin VB.Menu mnuViewStatusBar 
         Caption         =   "状态栏(&B)"
         Checked         =   -1  'True
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu mnuHelpAbout 
         Caption         =   "关于(&A) "
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mbMoving As Boolean
Const sglSplitLimit = 500

Private Sub Command2_Click()
'月流量查询
Dim intnum As Single
Dim introw As Single, intcol As Single
Dim adomonthrs As Recordset, adoyearrs As Recordset
Dim db As Connection
Dim sql As String
On Error GoTo errordo
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\db1.mdb;"
Set adomonthrs = New Recordset
sql = "select * from 月排放量记录 where 企业名称 ='" & adoPrimaryRS!企业名称 _
& "' and 记录时间='" & Combo2.Text & "/" & LTrim(Combo3.Text) & "'"
adomonthrs.Open sql, db, adOpenStatic, adLockOptimistic
If adomonthrs.EOF Then
    MsgBox "没有记录!"
Else
    '显示记录
    For introw = 1 To 5 Step 2
        For intcol = 0 To 10
            If introw < 5 Or intcol <= 8 Then
            MSFlexGrid1.Row = introw
            MSFlexGrid1.Col = intcol
            MSFlexGrid1.CellForeColor = &HC25B10
            MSFlexGrid1.Text = Str(adomonthrs.Fields.Item(intcol + 3 + intnum * 11))
            MSChart3.Row = intcol + 1 + intnum * 11
            MSChart3.Data = Val(MSFlexGrid1.Text)
            End If
        Next intcol
        intnum = intnum + 1
    Next introw
    Exit Sub
End If
Exit Sub
errordo:
    MsgBox Err.Description

End Sub

Private Sub Command3_Click()
Picture1(2).ZOrder

End Sub

Private Sub Command4_Click()
Picture1(1).ZOrder

End Sub

Private Sub Command5_Click()
Picture1(1).ZOrder
End Sub

Private Sub Command6_Click()
Picture1(2).ZOrder
End Sub

Private Sub Command7_Click()
'年排放量查询
Dim intnum As Single
Dim introw As Single, intcol As Single
Dim adoyearrs As Recordset
Dim db As Connection
Dim sql As String
On Error GoTo errordo
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\db1.mdb;"
Set adoyearrs = New Recordset
sql = "select * from 年排放量记录 where 企业名称 ='" & adoPrimaryRS!企业名称 _
& "' and 记录时间='" & Combo1.Text & "'"
adoyearrs.Open sql, db, adOpenStatic, adLockOptimistic
If adoyearrs.EOF Then
    MsgBox "没有记录!"
Else
'显示记录
    MSChart2.Column = 1
    For introw = 1 To 3 Step 2
        For intcol = 0 To 5
            MSFlexGrid2.Row = introw
            MSFlexGrid2.Col = intcol
            MSFlexGrid2.CellForeColor = &HC25B10
            MSFlexGrid2.Text = Str(adoyearrs.Fields.Item(intcol + 3 + intnum * 6))
            MSChart2.Row = intcol + 1 + intnum * 6
            MSChart2.Data = Val(MSFlexGrid2.Text) / 10
        Next intcol
        intnum = intnum + 1
    Next introw
End If
Exit Sub
errordo:
    MsgBox Err.Description

End Sub

Private Sub Form_Load()
    Dim intcol As Single, introw As Single
    Dim intyear As Integer, intmonth As Single
    Dim xnode As Node
    Dim db As Connection
    Set db = New Connection
    db.CursorLocation = adUseClient
    db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\db1.mdb;"
    '在tvTreeView控件中按企业类别不同显示数据库中的记录
    Set xnode = tvTreeView.Nodes.Add(, , "企业部门", "企业部门", 3)
    xnode.Expanded = True
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "医药", "医药", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "农林牧渔", "农林牧渔", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "工业", "工业", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "建筑业", "建筑业", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "饮食业", "饮食业", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "教育事业", "教育事业", 1)
    Set xnode = tvTreeView.Nodes.Add("企业部门", tvwChild, "其他行业", "其他行业", 1)
    Set adoPrimaryRS = New Recordset
    adoPrimaryRS.Open "select * from 排污企业 ", db, adOpenStatic, adLockOptimistic
    adoPrimaryRS.MoveFirst
    Do Until adoPrimaryRS.EOF
        Select Case adoPrimaryRS!企业类别
            Case "医药"
            Set xnode = tvTreeView.Nodes.Add("医药", tvwChild, , adoPrimaryRS!企业名称, 2)
            xnode.Tag = adoPrimaryRS!编号ID
            
            Case "农林牧渔"
            Set xnode = tvTreeView.Nodes.Add("农林牧渔", tvwChild, , adoPrimaryRS!企业名称, 2)
            xnode.Tag = adoPrimaryRS!编号ID
            
            Case "工业"
            Set xnode = tvTreeView.Nodes.Add("工业", tvwChild, , adoPrimaryRS!企业名称, 2)
            xnode.Tag = adoPrimaryRS!编号ID

            Case "建筑业"
            Set xnode = tvTreeView.Nodes.Add("建筑业", tvwChild, , adoPrimaryRS!企业名称, 2)
            xnode.Tag = adoPrimaryRS!编号ID

⌨️ 快捷键说明

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