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

📄 frmmain.frm

📁 自动检查邮件
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Caption         =   "POP3 用户名:"
         Height          =   180
         Left            =   450
         TabIndex        =   14
         Top             =   1155
         Width           =   1080
      End
      Begin VB.Label Label3 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "POP3 密码:"
         Height          =   180
         Left            =   630
         TabIndex        =   13
         Top             =   1485
         Width           =   900
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "帐号标题:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Left            =   645
         TabIndex        =   12
         Top             =   480
         Width           =   885
      End
   End
   Begin VB.Timer tmrCheckMail 
      Enabled         =   0   'False
      Interval        =   3000
      Left            =   2190
      Top             =   1290
   End
   Begin MSWinsockLib.Winsock Winsock1 
      Index           =   0
      Left            =   2190
      Top             =   840
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin VB.Frame fraEmailOptions 
      BackColor       =   &H0000FFFF&
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   43
      TabIndex        =   6
      Top             =   1860
      Width           =   5405
      Begin VB.CommandButton cmdOptions 
         BackColor       =   &H00E6C4D7&
         Caption         =   "选项"
         Height          =   375
         Left            =   1590
         Style           =   1  'Graphical
         TabIndex        =   21
         Top             =   0
         Width           =   1155
      End
      Begin VB.CommandButton cmdCheckMail 
         BackColor       =   &H00F4EADB&
         Caption         =   "检查"
         Height          =   375
         Left            =   0
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   0
         Width           =   915
      End
      Begin VB.CommandButton cmdDeleteAccount 
         BackColor       =   &H00E6C4D7&
         Caption         =   "删除帐号"
         Height          =   375
         Left            =   4050
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   0
         Width           =   1335
      End
      Begin VB.CommandButton cmdAdd 
         BackColor       =   &H00E6C4D7&
         Caption         =   "添加帐号"
         Height          =   375
         Left            =   2820
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   0
         Width           =   1155
      End
   End
   Begin MSComctlLib.ListView lvwEmail 
      Height          =   1485
      Left            =   52
      TabIndex        =   17
      Top             =   300
      Width           =   5400
      _ExtentX        =   9525
      _ExtentY        =   2619
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   3
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "帐号"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "状态"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Alignment       =   1
         SubItemIndex    =   2
         Text            =   "大小"
         Object.Width           =   2540
      EndProperty
   End
   Begin VB.Label lblEdit 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "双击编辑"
      Height          =   180
      Left            =   4725
      TabIndex        =   20
      Top             =   45
      Width           =   720
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      BackColor       =   &H00000080&
      BackStyle       =   0  'Transparent
      Caption         =   "E-Mail帐号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000080&
      Height          =   195
      Left            =   75
      TabIndex        =   10
      Top             =   30
      Width           =   1260
   End
   Begin VB.Menu mnuPopup 
      Caption         =   ""
      Visible         =   0   'False
      Begin VB.Menu mnuFav 
         Caption         =   ""
         Index           =   0
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:05/09/04
'描  述:电子邮件自动检查工具
'网  站:http://www.mndsoft.com/
'e-mail:mnd@mndsoft.com
'OICQ  : 88382850
'****************************************************************************
Option Explicit

Dim New1 As FrmMSNPopUp

Public Sub DoCheckMail(Index As Integer)
  On Error GoTo Err
  lvwEmail.ListItems(Index + 1).SubItems(1) = "正在检查..."
  lvwEmail.ListItems(Index + 1).SubItems(2) = " "
  
  DoEvents
  Pause 0.5
  
  If m_Server(Index) = "" Or m_User(Index) = "" Or m_Password(Index) = "" Then Exit Sub
  Call CheckMail(Index, m_Server(Index), m_User(Index), m_Password(Index))

Err:
  tmrCheckMail.Enabled = False
  tmrCheckMail.Enabled = True
End Sub

Sub CheckMail(Index As Integer, vServer As String, Username As String, Password As String)
  DoEvents
  m_State(Index) = POP3_Connect
  
  If m_Ready(Index) = False Then Exit Sub
  m_Ready(Index) = False
  
  On Error Resume Next
  Unload Winsock1(Index)
  Load Winsock1(Index)
    
  Winsock1(Index).Close
  Winsock1(Index).Tag = Username & "|" & Password
  Winsock1(Index).LocalPort = 0
  Winsock1(Index).Connect vServer, 110
End Sub

Private Sub cmdCancel_Click()
  fraEmail.Visible = False
  txtTitle = ""
  txtUsername = ""
  txtServer = ""
  txtPassword = ""
  Adding = False
End Sub

Private Sub cmdCancel2_Click()
  fraSettings.Visible = False
  Call LoadSettings
End Sub

Sub LoadSettings()
  If Val(GetSetting("AllSeeingEye", "Settings", "Seconds")) = 0 Then
    Call SaveSetting("AllSeeingEye", "Settings", "Seconds", "30")
  End If
  txtSeconds = Val(GetSetting("AllSeeingEye", "Settings", "Seconds"))
  tmrCheckMail.Interval = Val(txtSeconds) * 1000
  
  If GetSetting("AllSeeingEye", "Settings", "PlaySound") = "" Then
    Call SaveSetting("AllSeeingEye", "Settings", "PlaySound", "1")
  End If
  chkSound.Value = Val(GetSetting("AllSeeingEye", "Settings", "PlaySound"))
  
  If GetSetting("AllSeeingEye", "Settings", "Notify") = "" Then
    Call SaveSetting("AllSeeingEye", "Settings", "Notify", "1")
  End If
  chkNotify.Value = Val(GetSetting("AllSeeingEye", "Settings", "Notify"))
  
  Picture1.BackColor = BackColor
End Sub


Private Sub cmdCheckMail_Click()
  tmrCheckMail_Timer
End Sub

Private Sub cmdDeleteAccount_Click()
  DeleteEmailAccount (lvwEmail.SelectedItem.Tag)
  Call LoadEmailAccounts
  Call tmrCheckMail_Timer
End Sub

Private Sub cmdOptions_Click()
  tmrCheckMail.Enabled = False
  Adding = True
  Call LoadBackground
  fraSettings.Visible = True
  DoEvents
End Sub

Private Sub cmdSave_Click()
  Dim RS As Recordset
  If Adding Then
    Set RS = DB.OpenRecordset("EmailAccounts")
    RS.AddNew
  Else
    Set RS = DB.OpenRecordset("Select * From EmailAccounts Where ID=" & CurrAccount)
    RS.Edit
  End If
  
  RS!Name = txtTitle
  RS!User = txtUsername
  RS!Password = Encrypt(txtPassword)
  RS!Server = txtServer
  RS.Update
  
  Call LoadEmailAccounts
  fraEmail.Visible = False
  Call cmdCheckMail_Click
End Sub

Private Sub cmdAdd_Click()
  txtTitle = ""
  txtUsername = ""
  txtServer = ""
  txtPassword = ""
  lblHeading = "添加帐号:"
  tmrCheckMail.Enabled = False
  Adding = True
  fraEmail.Visible = True
  DoEvents
  txtTitle.SetFocus
End Sub

Private Sub cmdSave2_Click()
  Call SaveSetting("AllSeeingEye", "Settings", "Seconds", txtSeconds)
  tmrCheckMail.Interval = Val(txtSeconds) * 1000
  
  Call SaveSetting("AllSeeingEye", "Settings", "PlaySound", Val(chkSound))
  Call SaveSetting("AllSeeingEye", "Settings", "Notify", Val(chkNotify))
  
  Call SaveSetting("AllSeeingEye", "Settings", "BGColor", Picture1.BackColor)
  Call LoadBackground
  
  fraSettings.Visible = False
  Call cmdCheckMail_Click
End Sub

Private Sub Form_Activate()
  If Not FirstRun Then
    tmrCheckMail_Timer
    tmrCheckMail.Enabled = True
    FirstRun = True
  End If

⌨️ 快捷键说明

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