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

📄 form7.frm

📁 根据MS Proxy的日志文件进行计费的程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form UserMail 
   Caption         =   "发送Email"
   ClientHeight    =   4710
   ClientLeft      =   1650
   ClientTop       =   1545
   ClientWidth     =   6285
   LinkTopic       =   "Form1"
   ScaleHeight     =   9802.978
   ScaleMode       =   0  'User
   ScaleWidth      =   14299.19
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Command1 
      Caption         =   "发送Email"
      Enabled         =   0   'False
      Height          =   375
      Left            =   3030
      TabIndex        =   11
      Top             =   5850
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   1455
      Left            =   45
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   10
      ToolTipText     =   $"form7.frx":0000
      Top             =   4125
      Width           =   9375
   End
   Begin VB.CommandButton Send 
      Caption         =   "生成Email"
      Height          =   375
      Left            =   1110
      TabIndex        =   7
      Top             =   5850
      Width           =   1575
   End
   Begin VB.CommandButton AboutBox 
      Caption         =   "关于Email"
      Height          =   375
      Left            =   4950
      TabIndex        =   6
      Top             =   5850
      Width           =   1575
   End
   Begin VB.PictureBox picButtons 
      Align           =   1  'Align Top
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   330
      Left            =   0
      ScaleHeight     =   330
      ScaleWidth      =   6285
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   0
      Width           =   6285
      Begin VB.CommandButton cmdClose 
         Caption         =   "关闭"
         Height          =   330
         Left            =   4398
         TabIndex        =   5
         Tag             =   "&Close"
         Top             =   15
         Width           =   1437
      End
      Begin VB.CommandButton cmdFilter 
         Caption         =   "过滤"
         Height          =   330
         Left            =   2924
         TabIndex        =   4
         Tag             =   "&Filter"
         Top             =   0
         Width           =   1462
      End
      Begin VB.CommandButton cmdSort 
         Caption         =   "排序"
         Height          =   330
         Left            =   1462
         TabIndex        =   3
         Tag             =   "&Sort"
         Top             =   0
         Width           =   1462
      End
      Begin VB.CommandButton cmdRefresh 
         Caption         =   "刷新"
         Height          =   330
         Left            =   0
         TabIndex        =   2
         Tag             =   "&Refresh"
         Top             =   0
         Width           =   1462
      End
      Begin VB.Label Label1 
         Caption         =   "Label1"
         Height          =   30
         Left            =   330
         TabIndex        =   8
         Top             =   315
         Width           =   4695
      End
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\wsm\wsm.mdb"
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   2160
      Options         =   0
      ReadOnly        =   -1  'True
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "Output"
      Top             =   1800
      Visible         =   0   'False
      Width           =   2940
   End
   Begin MSDBGrid.DBGrid grdDataGrid 
      Bindings        =   "form7.frx":0015
      Height          =   3285
      Left            =   0
      OleObjectBlob   =   "form7.frx":00E3
      TabIndex        =   0
      Top             =   810
      Width           =   9345
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "Internet 流量计费系统"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   2280
      TabIndex        =   9
      Top             =   390
      Width           =   2340
   End
End
Attribute VB_Name = "UserMail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim msSortCol As String
Dim mbCtrlKey As Integer

Private Sub AboutBox_Click()
AboutFrm.Show 1
End Sub

Sub cmdClose_Click()
    Unload Me
End Sub

Private Sub cmdFilter_Click()
    On Error GoTo FilterErr

    Dim recRecordset1 As Recordset, recRecordset2 As Recordset
    Dim sFilterStr As String

    If Data1.RecordsetType = vbRSTypeTable Then
        Beep
        MsgBox "You Cannot Filter a Table Recordset!", 48, "错误"
        Exit Sub
    End If
    
    Set recRecordset1 = Data1.Recordset                        'copy the recordset
    
    sFilterStr = InputBox("Enter Filter Expression:")
    If Len(sFilterStr) = 0 Then Exit Sub

    Screen.MousePointer = vbHourglass
    recRecordset1.Filter = sFilterStr
    Set recRecordset2 = recRecordset1.OpenRecordset(recRecordset1.Type) 'establish the filter
    Set Data1.Recordset = recRecordset2                        'assign back to original recordset object

    Screen.MousePointer = vbDefault
    Exit Sub

FilterErr:
    Screen.MousePointer = vbDefault
    MsgBox "Error:" & Err & " " & Err.Description, vbOKOnly + vbExclamation, "错误"
End Sub

Private Sub cmdRefresh_Click()
    On Error GoTo RefErr
    
    Data1.Recordset.Requery
    
    Exit Sub
    
RefErr:
    MsgBox "Error:" & Err & " " & Err.Description, vbOKOnly + vbExclamation, "错误"
End Sub


Private Sub cmdSort_Click()
    On Error GoTo SortErr

    Dim recRecordset1 As Recordset, recRecordset2 As Recordset
    Dim SortStr As String

    If Data1.RecordsetType = vbRSTypeTable Then
        Beep
        MsgBox "You Cannot Sort a Table Recordset!", 48, "错误"
        Exit Sub
    End If

    Set recRecordset1 = Data1.Recordset                        'copy the recordset
    
    If Len(msSortCol) = 0 Then
        SortStr = InputBox("Enter Sort Column:")
        If Len(SortStr) = 0 Then Exit Sub
    Else
        SortStr = msSortCol
    End If

    Screen.MousePointer = vbHourglass
    recRecordset1.Sort = SortStr
    
    'establish the Sort
    Set recRecordset2 = recRecordset1.OpenRecordset(recRecordset1.Type)
    Set Data1.Recordset = recRecordset2
    

⌨️ 快捷键说明

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