Dim
sd As WinForm.DateTimePicker
Dim ed As WinForm.DateTimePicker
sd = e.Form.Controls("StartDate")
ed = e.Form.Controls("EndDate")
If sd.Value Is Nothing OrElse ed.Value Is Nothing Then
MessageBox.Show("请输入起始日期和终止日期!","提示", MessageBoxButtons.OK ,MessageBoxIcon.Information)
e.Cancel = True
End If
放在主窗口的BeforeClose事件中不执行如何处理?