Private Sub cmdPrevious_Click()
mailIndex = frmGetMail.MailMess.MsgIndex
frmGetMail.MailMess.MsgIndex = mailIndex - 1
frmGetMail.Text1.Text = frmMail.MailMess.MsgOrigAddress
frmGetMail.Text2.Text = frmMail.MailMess.MsgSubject
frmGetMail.Text3.Text = frmMail.MailMess.MsgNoteText
If mailIndex = 0 Then
frmGetMail.cmdPrevious.Enabled = False
End If
End Sub
输入frmGetMail子窗体“向后”按钮的程序代码:
Private Sub cmdNext_Click()
mailCounts = frmGetMail.MailMess.MsgCount - 1
mailIndex = frmGetMail.MailMess.MsgIndex
frmGetMail.MailMess.MsgIndex = mailIndex + 1
frmGetMail.Text1.Text = frmMail.MailMess.MsgOrigAddress
frmGetMail.Text2.Text = frmMail.MailMess.MsgSubject
frmGetMail.Text3.Text = frmMail.MailMess.MsgNoteText
If mailIndex = mailCounts Then
frmGetMail.cmdNext.Enabled = False
End If
End Sub