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

📄 form1.frm

📁 vb编程实例
💻 FRM
字号:
VERSION 5.00
Object = "{20C62CAE-15DA-101B-B9A8-444553540000}#1.1#0"; "MSMAPI32.OCX"
Begin VB.Form form1 
   Caption         =   "检查信箱中是否有新邮件"
   ClientHeight    =   2595
   ClientLeft      =   1815
   ClientTop       =   2505
   ClientWidth     =   6495
   LinkTopic       =   "Form1"
   ScaleHeight     =   2595
   ScaleWidth      =   6495
   StartUpPosition =   1  '所有者中心
   Begin MSMAPI.MAPISession MAPISession1 
      Left            =   150
      Top             =   600
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DownloadMail    =   -1  'True
      LogonUI         =   -1  'True
      NewSession      =   0   'False
   End
   Begin MSMAPI.MAPIMessages MAPIMessages1 
      Left            =   300
      Top             =   1650
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      AddressEditFieldCount=   1
      AddressModifiable=   0   'False
      AddressResolveUI=   0   'False
      FetchSorted     =   0   'False
      FetchUnreadOnly =   0   'False
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   465
      Left            =   3405
      TabIndex        =   6
      Top             =   1935
      Width           =   1515
   End
   Begin VB.TextBox Text2 
      Height          =   345
      Left            =   2220
      TabIndex        =   3
      Top             =   1320
      Width           =   2865
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2220
      TabIndex        =   2
      Top             =   870
      Width           =   2865
   End
   Begin VB.CommandButton command1 
      Caption         =   "开始检查"
      Height          =   465
      Left            =   1905
      TabIndex        =   0
      Top             =   1935
      Width           =   1515
   End
   Begin VB.Label Label3 
      Caption         =   "密码:"
      Height          =   345
      Left            =   1440
      TabIndex        =   5
      Top             =   1320
      Width           =   645
   End
   Begin VB.Label Label2 
      Caption         =   "用户:"
      Height          =   345
      Left            =   1440
      TabIndex        =   4
      Top             =   870
      Width           =   645
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "当前有两封未读邮件"
      Height          =   315
      Left            =   1350
      TabIndex        =   1
      Top             =   330
      Width           =   3945
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub command1_Click()
  MAPISession1.UserName = Text1.Text
  MAPISession1.Password = Text2.Text
  MAPISession1.LogonUI = False
  MAPISession1.DownLoadMail = True
  MAPISession1.SignOn
  MAPIMessages1.FetchUnreadOnly = True
  MAPIMessages1.SessionID = MAPISession1.SessionID
  MAPIMessages1.Fetch
  If MAPIMessages1.MsgCount > 0 Then
     Label1.Caption = "信箱中有" & MAPIMessages1.MsgCount & "封未读邮件"
   Else
     Label1.Caption = "没有未读邮件"
  End If
  Me.MAPISession1.SignOff
End Sub

Private Sub Command2_Click()
  End
End Sub

⌨️ 快捷键说明

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