Private Sub numDuration_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles numDuration.KeyUp numDuration.Value = numDuration.Value End Sub Private Sub numDuration_ValueChanged(ByVal sender As Object, ByVal e As System
Sub可以理解为执行一个过车,一个操作. Function在执行完过后,还要返回一个结果. Sub:过程:Function:函数,可以带返回值. 语法: Sub SubName(参数1,参数2,...) ... End Sub Function FunctionName(参数1,参数2,...) ... FunctionName=返回值 End Function 调用时: Sub 只能用: SubName(参数1,参数2,...) 变量=FunctionName(参数1