试试重写一个函数吧
例如:
函数 ss
Dim a As List(of WinForm.Button) = args(0)
If Not Forms("等待响应").Opened Then
Forms("等待响应").Open
For Each b As WinForm.Button In a
b.PerformClick
If b.Text > "" Then
Forms("等待响应").Controls("提示信息").text = b.Text
End If
Next
Forms("等待响应").Close
End If
执行
Dim bs As New List(of WinForm.Button)
bs.Add(CType(Forms("??").Controls("Button1"),WinForm.Button))
bs.Add(CType(Forms("??").Controls("Button2"),WinForm.Button))
Functions.Execute("ss",bs)