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

📄 printfeesort.frm

📁 适合乡镇供电所使用电费处理系统v3 软件
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form PrintFeeSort 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "打印电价分类"
   ClientHeight    =   6240
   ClientLeft      =   3420
   ClientTop       =   3060
   ClientWidth     =   10080
   Icon            =   "PrintFeeSort.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6240
   ScaleWidth      =   10080
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame3 
      Height          =   6210
      Left            =   2220
      TabIndex        =   5
      Top             =   -45
      Width           =   7800
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   5970
         Left            =   90
         TabIndex        =   7
         Top             =   150
         Width           =   7620
         _ExtentX        =   13441
         _ExtentY        =   10530
         _Version        =   393216
         AllowUpdate     =   0   'False
         HeadLines       =   1
         RowHeight       =   17
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "打印选项"
      Height          =   2040
      Left            =   30
      TabIndex        =   4
      Top             =   4125
      Width           =   2100
      Begin VB.OptionButton Option2 
         Caption         =   "输出到打印机"
         Height          =   225
         Left            =   330
         TabIndex        =   11
         Top             =   330
         Width           =   1395
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   360
         Style           =   2  'Dropdown List
         TabIndex        =   10
         Top             =   1050
         Width           =   1455
      End
      Begin VB.OptionButton Option1 
         Caption         =   "输出到文件"
         Height          =   240
         Left            =   315
         TabIndex        =   9
         Top             =   690
         Width           =   1215
      End
      Begin VB.CheckBox Check1 
         Caption         =   "表格输出"
         Height          =   240
         Left            =   360
         TabIndex        =   6
         Top             =   1740
         Width           =   1620
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   105
      Top             =   5970
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   4170
      Left            =   45
      TabIndex        =   0
      Top             =   -45
      Width           =   2070
      Begin MSComctlLib.Toolbar Toolbar4 
         Height          =   570
         Left            =   150
         TabIndex        =   8
         Top             =   375
         Width           =   1560
         _ExtentX        =   2752
         _ExtentY        =   1005
         ButtonWidth     =   2725
         ButtonHeight    =   1005
         Style           =   1
         TextAlignment   =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "按电价打印"
               ImageIndex      =   4
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar3 
         Height          =   570
         Left            =   120
         TabIndex        =   3
         Top             =   3450
         Width           =   1740
         _ExtentX        =   3069
         _ExtentY        =   1005
         ButtonWidth     =   2725
         ButtonHeight    =   1005
         Style           =   1
         TextAlignment   =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "退      出"
               ImageIndex      =   3
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar2 
         Height          =   570
         Left            =   120
         TabIndex        =   2
         Top             =   2310
         Width           =   1665
         _ExtentX        =   2937
         _ExtentY        =   1005
         ButtonWidth     =   2725
         ButtonHeight    =   1005
         Style           =   1
         TextAlignment   =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "按村组打印"
               ImageIndex      =   2
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar Toolbar1 
         Height          =   570
         Left            =   135
         TabIndex        =   1
         Top             =   1260
         Width           =   1635
         _ExtentX        =   2884
         _ExtentY        =   1005
         ButtonWidth     =   2725
         ButtonHeight    =   1005
         Style           =   1
         TextAlignment   =   1
         ImageList       =   "ImageList1"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   1
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "按台区打印"
               ImageIndex      =   1
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   150
         Top             =   4275
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   4
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintFeeSort.frx":08CA
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintFeeSort.frx":11A6
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintFeeSort.frx":2082
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "PrintFeeSort.frx":24DE
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "PrintFeeSort"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim FileFormat As Integer

Private Sub Form_Load()
    If Screen.Width \ Screen.TwipsPerPixelX = 800 And Screen.Height \ Screen.TwipsPerPixelY = 600 Then
       Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 1 - 600
    Else
       Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    End If
    Adodc1.ConnectionString = "DBQ=" & App.Path & "\Data\eletricity.Mdb" & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=281;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;PWD=;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;"
    Adodc1.RecordSource = "SELECT 用户电费.电价类别,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数 From 用户电费 where 用户电费.镇村代码 ='" & UserSeek & "' GROUP BY 用户电费.电价类别"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
    Call CellFormat
    Combo1.AddItem "Text文本文件"
    Combo1.AddItem "Excel电子表格"
    Combo1.AddItem "Html文件"
    FileFormat = GetSetting(App.EXEName, "PrintSetup", "Filemat", "")
    Combo1.ListIndex = IIf(FileFormat = 0, 0, FileFormat)
    Option2.Value = True
    Combo1.Enabled = False
End Sub

Private Sub Option2_Click()
     If Option2.Value = True Then
        Option1.Value = False
        Combo1.Enabled = False
     End If
End Sub

Private Sub Option1_Click()
     If Option1.Value = True Then
        Option2.Value = False
        Combo1.Enabled = True
     End If
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Adodc1.RecordSource = "SELECT 用户电费.台区,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数 From 用户电费 where 用户电费.镇村代码 ='" & UserSeek & "' GROUP BY 用户电费.台区"
    Adodc1.Refresh
    Call CellFormat
    DataGrid1.Caption = XzName & XcName & GzNian & "年" & GzYue & "月份台区汇总表"
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
    Adodc1.RecordSource = "SELECT 用户电费.镇村代码,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数  From 用户电费 where  用户电费.镇村代码 ='" & UserSeek & "' GROUP BY 用户电费.镇村代码"
    Adodc1.Refresh
    DataGrid1.Caption = pbDw & XzName & GzNian & "年" & GzYue & "月份用电汇总表"
    Call CellFormat
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)
       Unload Me
End Sub

Sub CellFormat()
    With DataGrid1
       .Columns(0).Width = 1200
       .Columns(0).Alignment = dbgCenter

       .Columns(1).Width = 1500
       .Columns(1).Alignment = dbgRight

       .Columns(2).Width = 1500
       .Columns(2).Alignment = dbgRight

       .Columns(3).NumberFormat = "0.00"
       .Columns(3).Width = 1500
       .Columns(3).Alignment = dbgRight
       
       .Columns(4).NumberFormat = "0.00"
       .Columns(4).Width = 1500
       .Columns(4).Alignment = dbgRight
       
       .Columns(5).Width = 1000
       .Columns(5).Alignment = dbgCenter
    End With
End Sub

Private Sub Toolbar4_ButtonClick(ByVal Button As MSComctlLib.Button)
    Adodc1.RecordSource = "SELECT 用户电费.电价类别,sum(" & CC & ") AS 本月电量,sum(" & DD & ") AS 总电量,sum(" & GG & ") AS 本月电费,sum(" & HH & ") AS 总电费,COUNT(*) AS 用户数 From 用户电费 where  用户电费.镇村代码 ='" & UserSeek & "' GROUP BY 用户电费.电价类别"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
    DataGrid1.Caption = XzName & XcName & GzNian & "年" & GzYue & "月份电价类别汇总表"
    Call CellFormat
End Sub

⌨️ 快捷键说明

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