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

📄 frmread.frm

📁 < VB高级网络编程技术>>随书源代码第2章,里面有很多有用的例程,希望对大家的开发工作有帮助!
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmRead 
   Caption         =   "阅读"
   ClientHeight    =   4875
   ClientLeft      =   3735
   ClientTop       =   2370
   ClientWidth     =   6705
   LinkTopic       =   "Form1"
   ScaleHeight     =   4875
   ScaleWidth      =   6705
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   5940
      Top             =   1680
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmRead.frx":0000
            Key             =   "fw"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmRead.frx":0454
            Key             =   "all"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmRead.frx":08A8
            Key             =   "re"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tbrRead 
      Align           =   1  'Align Top
      Height          =   555
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   6705
      _ExtentX        =   11827
      _ExtentY        =   979
      ButtonWidth     =   1455
      ButtonHeight    =   926
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   5
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "答复"
            Key             =   "reply"
            Description     =   "答复"
            Object.ToolTipText     =   "答复"
            ImageKey        =   "re"
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Style           =   4
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "全部答复"
            Key             =   "ReplyAll"
            Description     =   "全部答复"
            Object.ToolTipText     =   "答复所有收到的邮件"
            ImageKey        =   "all"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Style           =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "转发"
            Key             =   "forward"
            Description     =   "转发信息"
            Object.ToolTipText     =   "转发信息"
            ImageKey        =   "fw"
         EndProperty
      EndProperty
   End
   Begin VB.TextBox txtRead 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00800000&
      Height          =   2805
      Left            =   60
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   2010
      Width           =   6555
   End
   Begin VB.Label Label2 
      Caption         =   "收件人"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   9
      Top             =   1005
      Width           =   855
   End
   Begin VB.Label lblTo 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   210
      Left            =   1080
      TabIndex        =   8
      Top             =   1030
      Width           =   5535
   End
   Begin VB.Label lblCC 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   210
      Left            =   1080
      TabIndex        =   6
      Top             =   1340
      Width           =   5535
   End
   Begin VB.Label lblFrom 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   210
      Left            =   1080
      TabIndex        =   5
      Top             =   720
      Width           =   5535
   End
   Begin VB.Label lblSubject 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   210
      Left            =   1080
      TabIndex        =   4
      Top             =   1650
      Width           =   5535
   End
   Begin VB.Label Label3 
      Caption         =   "主题"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   2
      Top             =   1650
      Width           =   855
   End
   Begin VB.Label lbl 
      Caption         =   "抄送"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   1
      Top             =   1350
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "发件人:"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   0
      Top             =   720
      Width           =   855
   End
End
Attribute VB_Name = "frmRead"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private intMsgIndex As Integer

Private Sub Form_Load()
'在发生错误的情况下存储在这。
intMsgIndex = frmMain.mapMess.MsgIndex
End Sub

Private Sub tbrRead_ButtonClick(ByVal Button As MSComCtlLib.Button)
On Error GoTo SendErr
Select Case Button.Key
Case "reply"    '答复
    With frmMain.mapMess
        .Copy
        .Reply
        .AddressResolveUI = True
        .Send True
    End With
Case "ReplyAll" '全部答复
    With frmMain.mapMess
        .ReplyAll
        .Send True
    End With
Case "forward"  '转发
    With frmMain.mapMess
        .Forward
        .AddressResolveUI = True
        .Send True
    End With
Case Else
    Debug.Print Button.Key
End Select
Exit Sub
SendErr:
'出错后的处理
If Err.Number = mapInvalidComposeBufferAction Then
    frmMain.mapMess.MsgIndex = intMsgIndex '重新设置阅读缓冲区
    Resume
Else '其他情况
    MsgBox Err.Number & ": " & Err.Description
End If
End Sub

⌨️ 快捷键说明

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