1、窗口afterload事件:Dim dr1 As DataRow = DataTables("注意事项").Find("提示 = 2 ")
Dim dr3 As DataRow = DataTables("注意事项").Find("开始提示 = 1")
'System.Threading.Thread.Sleep(8000) ‘暂停8秒
If dr3 IsNot Nothing Then
Tables("注意事项").filter = "开始提示 = 1 And 完成 = False"
MessageBox.Show("有任务已经开始!", "提示", MessageBoxButtons.OK, MessageBoxIcon.information)
End If
If dr1 IsNot Nothing Then
Tables("注意事项").filter = "提示 = 2 And 完成 = False"
MessageBox.Show("有任务即将到期!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Dim dr2 As DataRow = DataTables("注意事项").Find("提示 = 3 And 完成 = False")
If dr2 IsNot Nothing Then
Tables("注意事项").filter = "提示 = 3 And 完成 = False"
MessageBox.Show("有任务已经过期!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
2、还有就是Button Click事件:
Dim dr1 As DataRow = DataTables("注意事项").Find("提示 = 2 ")
Dim dr3 As DataRow = DataTables("注意事项").Find("开始提示 = 1")
If dr3 IsNot Nothing Then
Tables("注意事项").filter = "开始提示 = 1"
MessageBox.Show("有任务已经开始!", "提示", MessageBoxButtons.OK, MessageBoxIcon.information)
End If
If dr1 IsNot Nothing Then
Tables("注意事项").filter = "提示 = 2"
MessageBox.Show("有任务即将到期!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Dim dr2 As DataRow = DataTables("注意事项").Find("提示 = 3 And 完成 = False")
If dr2 IsNot Nothing Then
Tables("注意事项").filter = "提示 = 3 And 完成 = False"
MessageBox.Show("有任务已经过期!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
Tables("注意事项").filter = ""
Tables("注意事项").sort = "排序用,结束日期"
--------
都是这种情况,重复几次弹窗。