?? frm發(fā)送電子郵件.frm
字號(hào):
VERSION 5.00
Begin VB.Form frm發(fā)送電子郵件
Caption = "發(fā)送電子郵件"
ClientHeight = 5820
ClientLeft = 60
ClientTop = 405
ClientWidth = 5070
LinkTopic = "Form1"
ScaleHeight = 5820
ScaleWidth = 5070
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox MAPISession1
Height = 480
Left = 1800
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 14
Top = 4560
Width = 1200
End
Begin VB.PictureBox MAPIMessages1
Height = 480
Left = 2640
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 13
Top = 4560
Width = 1200
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\桌面\新建文件夾\db2.mdb"
DefaultCursorType= 0 '缺省游標(biāo)
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "客戶信息表"
Top = 6840
Width = 2175
End
Begin VB.CommandButton Command1
Caption = "發(fā)送信息"
Height = 375
Left = 2880
TabIndex = 12
Top = 5400
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 375
Left = 3960
TabIndex = 11
Top = 5400
Width = 1095
End
Begin VB.Frame Frame2
Caption = "郵件內(nèi)容"
Height = 2415
Left = 0
TabIndex = 9
Top = 2880
Width = 5055
Begin VB.TextBox text1
Height = 2055
Index = 1
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 240
Width = 4815
End
End
Begin VB.Frame Frame1
Caption = "郵件主題"
Height = 735
Left = 0
TabIndex = 7
Top = 2040
Width = 5055
Begin VB.TextBox Text2
Height = 315
Left = 120
TabIndex = 8
Top = 240
Width = 4815
End
End
Begin VB.Frame Frame3
Height = 1935
Left = 0
TabIndex = 0
Top = 0
Width = 5055
Begin VB.Frame Frame4
Caption = "所有客戶信息列表"
Height = 1575
Left = 120
TabIndex = 3
Top = 240
Width = 2175
Begin VB.ListBox List1
DataField = "網(wǎng)址郵箱"
DataSource = "Data1"
Height = 1140
ItemData = "frm發(fā)送電子郵件.frx":0000
Left = 120
List = "frm發(fā)送電子郵件.frx":0002
TabIndex = 4
Top = 240
Width = 1935
End
End
Begin VB.Frame Frame5
Caption = "已選擇客戶信息列表"
Height = 1575
Left = 2760
TabIndex = 1
Top = 240
Width = 2175
Begin VB.ListBox List2
DataField = "網(wǎng)址郵箱"
DataSource = "Data1"
Height = 1140
ItemData = "frm發(fā)送電子郵件.frx":0004
Left = 120
List = "frm發(fā)送電子郵件.frx":0006
TabIndex = 2
Top = 240
Width = 1935
End
End
Begin VB.Label Label1
Caption = ">>"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
TabIndex = 6
Top = 700
Width = 375
End
Begin VB.Label Label2
Caption = "<<"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2400
TabIndex = 5
Top = 1150
Width = 375
End
End
End
Attribute VB_Name = "frm發(fā)送電子郵件"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myrs As Recordset
Private Sub Form_Load()
On Error Resume Next
Data1.DatabaseName = App.Path & "\db2.mdb"
Data1.RecordSource = "select * from 客戶信息表"
Data1.Refresh
frm_main.StatusBar1.Panels(1) = Me.Caption
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
On Error Resume Next
Set myrs = mydb.OpenRecordset("email", dbOpenTable) '設(shè)置保存郵件的數(shù)據(jù)表
myrs.Close '關(guān)閉數(shù)據(jù)表
mydb.Close '關(guān)閉數(shù)據(jù)表
If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.MoveFirst
Do While Data1.Recordset.EOF = False
List1.AddItem (Data1.Recordset.Fields("網(wǎng)址郵箱"))
Data1.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub Command1_Click() '發(fā)送郵件
On Error Resume Next
Dim temp_fsyj As String
Do While List2.ListCount > 0
temp_fsyj = List2.Text
List2.RemoveItem (List2.ListIndex)
Loop
MsgBox "郵件發(fā)送成功!"
End Sub
Private Sub List1_Click()
List2.AddItem (List1.Text)
List1.RemoveItem (List1.ListIndex)
End Sub
Private Sub List2_Click()
List1.AddItem (List2.Text)
List2.RemoveItem (List2.ListIndex)
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
frm主窗體.StatusBar1.Panels(1) = "楊揚(yáng)工作室 作者:小楊"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -