做一个计划任务,输入下面的代码
Dim frm = Windows.forms.Form.ActiveFormIf frm IsNot Nothing Then If frm.name = "Class108" Then frm.controls("Button2").Enabled = False End IfEnd If
http://www.foxtable.com/webhelp/scr/0657.htm