?? form1.frm
字號(hào):
VERSION 5.00
Begin VB.Form Form1
Caption = "郵件列表"
ClientHeight = 5715
ClientLeft = 60
ClientTop = 345
ClientWidth = 7650
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5715
ScaleWidth = 7650
Begin VB.ListBox Mlist
Height = 4380
Left = 480
TabIndex = 0
Top = 1080
Width = 6615
End
Begin VB.Label Label2
Caption = "收信人:"
Height = 315
Left = 480
TabIndex = 2
Top = 600
Width = 4335
End
Begin VB.Label Label1
Caption = "發(fā)信人:"
Height = 315
Left = 480
TabIndex = 1
Top = 120
Width = 4305
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Label1.Caption = "發(fā)信人:"
Label2.Caption = "收信人:"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'如果不是MDI窗體關(guān)閉和郵件對(duì)話未結(jié)束,則取消關(guān)閉
If UnloadMode = 4 Then
Else
If Main.MAPIMess.SessionID <> 0 Then
Me.WindowState = 1
Cancel = True
End If
End If
End Sub
Private Sub Form_Resize()
'當(dāng)窗體大小發(fā)生改變時(shí),調(diào)整列表框的大小
If WindowState <> 1 Then
Mlist.Width = ScaleWidth - Mlist.Left - 50
Mlist.Height = ScaleHeight - Mlist.Top
End If
End Sub
Private Sub Mlist_Click()
'根據(jù)選擇的郵件索引確定相關(guān)菜單項(xiàng)和工具欄按扭的可用狀態(tài)
Select Case Mlist.ListIndex
Case 0
Main.Toolbar1.Buttons("Previous1").Enabled = False
If Mlist.ListCount > 0 Then
Main.Toolbar1.Buttons("Next1").Enabled = True
End If
Case Mlist.ListCount - 1
Main.Toolbar1.Buttons("Next1").Enabled = False
If Mlist.ListCount > 0 Then
Main.Toolbar1.Buttons("Previous1").Enabled = True
End If
Case Else
Main.Toolbar1.Buttons("Previous1").Enabled = True
Main.Toolbar1.Buttons("Next1").Enabled = True
End Select
Main.MAPIMess.MsgIndex = Mlist.ListIndex
'顯示當(dāng)前郵件收信人和發(fā)信人的姓名
Label1.Caption = "發(fā)信人:" + Main.MAPIMess.MsgOrigDisplayName
Label2.Caption = "收信人:" + GetRCList(Main.MAPIMess, vbRecipTypeTo)
End Sub
Private Sub Mlist_DblClick()
If Not Form1.Mlist.ItemData(Form1.Mlist.ListIndex) Then
'在閱讀新郵件的窗體中顯示選中的消息
Call LoadMessage(Form1.Mlist.ListIndex, Form2)
Form1.Mlist.ItemData(Form1.Mlist.ListIndex) = True
Else
For i = 0 To Forms.Count - 1
If TypeOf Forms(i) Is Form2 Then
If Val(Forms(i).Tag) = Form1.Mlist.ListIndex Then
Forms(i).Show
Exit Sub
End If
End If
Next i
End If
End Sub
Private Sub Mlist_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Mlist_DblClick
End If
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -