基本常识错误
dim frm as winform.form = e.form
Dim d1 As Date = frm.controls("DateTimePicker1").valueDim d2 As Date = frm.controls("DateTimePicker2").value
Dim m As Integer = (d2.year - d1.year) * 12 + (d2.month - d1.month)frm.controls("textbox9").text = m
建议先读三遍帮助文件,心急吃不得热豆腐