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

📄 sendmail.frm

📁 TMS(小型票务管理VB+Access)
💻 FRM
字号:
VERSION 5.00
Begin VB.Form sendMail 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Send e-mail to Maxime Gheysen"
   ClientHeight    =   3300
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5685
   Icon            =   "sendMail.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3300
   ScaleWidth      =   5685
   Begin VB.TextBox Text2 
      Height          =   1575
      Left            =   120
      TabIndex        =   3
      Top             =   1080
      Width           =   5295
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1200
      TabIndex        =   2
      Top             =   240
      Width           =   4095
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Send"
      Height          =   255
      Left            =   4320
      MaskColor       =   &H00E0E0E0&
      MouseIcon       =   "sendMail.frx":0442
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2760
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Cancel"
      Height          =   255
      Left            =   120
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2760
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "Message :"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   720
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "Subject:"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "sendMail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

     Private Sub Command1_Click()
       Dim objSession As Object
       Dim objMessage As Object
       Dim objRecipient As Object

       Set objSession = CreateObject("mapi.session")

       objSession.Logon profileName:="Default"

       Set objMessage = objSession.Outbox.Messages.add

       objMessage.Subject = Text1.text
       objMessage.text = Text2.text

       Set objRecipient = objMessage.Recipients.add

       objRecipient.Name = "maxime.gheysen@swisscom.com"
       objRecipient.Type = mapiTo
       objRecipient.Resolve

          objMessage.Send showDialog:=False
       MsgBox "Message sent successfully!"

       objSession.Logoff
       Unload Me
       frmSplash.Show
     End Sub

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Command1.FontBold = True
 Command2.FontBold = False
End Sub

Private Sub Command2_Click()
  Unload Me
  frmSplash.Show
End Sub

Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Command2.FontBold = True
 Command1.FontBold = False
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Command1.FontBold = False
 Command2.FontBold = False
End Sub

⌨️ 快捷键说明

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