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

📄 frmmail.frm

📁 基于VB和SQL的邮件自动处理辅助教学系统原码
💻 FRM
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmMail 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "新邮件信息"
   ClientHeight    =   6300
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8685
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6300
   ScaleWidth      =   8685
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   600
      TabIndex        =   14
      Top             =   4920
      Width           =   1095
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2895
      Left            =   360
      TabIndex        =   13
      Top             =   1440
      Width           =   7815
      _ExtentX        =   13785
      _ExtentY        =   5106
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         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
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   600
      TabIndex        =   12
      Top             =   4920
      Width           =   1095
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   600
      TabIndex        =   11
      Top             =   4920
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   4920
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   600
      TabIndex        =   9
      Top             =   4920
      Width           =   1095
   End
   Begin VB.CommandButton command1 
      Caption         =   "进入邮箱"
      Height          =   375
      Left            =   2640
      TabIndex        =   7
      Top             =   4920
      Width           =   1215
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "退出"
      Height          =   375
      Left            =   4800
      TabIndex        =   6
      Top             =   4920
      Width           =   1215
   End
   Begin MSWinsockLib.Winsock Winsock1 
      Left            =   7560
      Top             =   240
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin VB.Frame Frame3 
      Caption         =   "密码"
      Height          =   615
      Left            =   4920
      TabIndex        =   4
      Top             =   0
      Width           =   2295
      Begin VB.TextBox txtPassword 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   120
         PasswordChar    =   "*"
         TabIndex        =   5
         Top             =   240
         Width           =   2055
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "用户名"
      Height          =   615
      Left            =   2520
      TabIndex        =   2
      Top             =   0
      Width           =   2295
      Begin VB.TextBox txtUserName 
         Height          =   285
         Left            =   120
         TabIndex        =   3
         Top             =   240
         Width           =   2055
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "远程主机"
      Height          =   615
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   2295
      Begin VB.TextBox txtHost 
         Height          =   285
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   2055
      End
   End
   Begin ComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   495
      Left            =   0
      TabIndex        =   8
      Top             =   5805
      Width           =   8685
      _ExtentX        =   15319
      _ExtentY        =   873
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   3
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Object.Width           =   4410
            MinWidth        =   4410
            Text            =   "邮件自动处理系统欢迎您"
            TextSave        =   "邮件自动处理系统欢迎您"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   6
            Alignment       =   2
            AutoSize        =   1
            Object.Width           =   8255
            TextSave        =   "2006-6-13"
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   5
            Alignment       =   2
            TextSave        =   "11:12"
            Object.Tag             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.Label Label1 
      Caption         =   "新邮件信息:"
      Height          =   375
      Left            =   360
      TabIndex        =   15
      Top             =   840
      Width           =   2175
   End
End
Attribute VB_Name = "frmMail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Enum POP3States
    POP3_Connect
    POP3_USER
    POP3_PASS
    POP3_STAT
    POP3_RETR
    POP3_DELE
    POP3_QUIT
End Enum
Public db As New ADODB.Connection
Public rs As New ADODB.Recordset
Private m_State         As POP3States
Private m_oMessage      As CMessage
Private m_colMessages   As New CMessages
Private Sub cmdDel_Click()
Unload Me
End Sub
Private Sub Command1_Click()
Unload Me
Form2.Show
End Sub
Private Sub Form_Load()
txtHost.Text = frmConfigurar.txtPop3Host.Text
txtUserName.Text = frmConfigurar.txtPop3User.Text
txtPassword.Text = frmConfigurar.txtPop3Passwd.Text
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = False
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Text5.Visible = False
'Check the emptiness of all the text fields except for the txtBody


    'For Each c In Controls
        'If TypeOf c Is TextBox And c.Name <> "txtBody" Then
            'If Len(c.Text) = 0 Then
               ' MsgBox c.Name & " can't be empty", vbCritical
                'Exit Sub
            'End If
        'End If
    'Next
    '
    
    
    'Change the value of current session state
    m_State = POP3_Connect
    '
    'Close the socket in case it was opened while another session
    Winsock1.Close
    '
    'reset the value of the local port in order to let to the
    'Windows Sockets select the new one itself
    'It's necessary in order to prevent the "Address in use" error,
    'which can appear if the Winsock Control has already used while the

⌨️ 快捷键说明

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