ll_Count = UpperBound(windows_name.Control)
For i = 1 To ll_Count
Choose Case TypeOf(This.Control[i])
Case CheckBox! // 复选框
.
.
Case CommandButton! //按键
.
.
.
End Choose
Next
下面的程序段将窗口上每个控件的类型保存到数组winobjecttype中:
object winobjecttype[]
long ll_count
FOR ll_count = 1 to UpperBound(Control[])
winobjecttype[ll_count] = w_dept.TypeOf(Control[ll_count])
NEXT