在窗口设置了个按钮每3分钟发送邮件
e.Form.TimerEnabled = True
e.Form.TimerInterval = 180000
在窗口的timetick中写了相关邮件发送的代码,其中每到100封后手工确认是否继续发送, 但发现到了100封后还在继续发送,不知错在哪里?
If i Mod 100 = 0 AndAlso i > 0 Then
e.Form.TimerEnabled = False
Dim Result As DialogResult
Result = MessageBox.Show("已经批量发送【" & i & "】封邮件,点击确认将继续发送,点击取消将退出" , "提示", MessageBoxButtons.OkCancel, MessageBoxIcon.Question)
If Result = DialogResult.Ok Then
e.Form.TimerEnabled = True
Return
End If