公共事件Done(),RaiseEvent Done()在此代码中做了什么?这是学生表格应用老师在课堂上做了这个,但他太快了,我无法捕捉所有细节。
Public Class Edit
Public Event Done()
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
Hide()
End Sub
Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
If txtNumber.Text = "" Then
MsgBox("Please enter data to number")
txtNumber.Focus()
lblNumber.ForeColor = Color.Red
Return
Else
lblNumber.ForeColor = SystemColors.ControlText
End If
Hide()
RaiseEvent Done()
End Sub