
窗口如何重左到右按顺序勾选。写到第三个的时候关掉发现在打开已经锁死状态了
Dim RWXD As WinForm.CheckBox = e.Form.Controls("RWXD") '设置窗口弹出时候,“任务下达”相关
Dim tba1() As WinForm.Control = {e.Form.Controls("HTCG"), e.Form.Controls("SHYJ"), e.Form.Controls("HTDG"), e.Form.Controls("HTCD")}
Dim tba2() As WinForm.Control = {e.Form.Controls("SHYJ"), e.Form.Controls("HTDG"), e.Form.Controls("HTCD")}
If RWXD.Checked Then
For Each tb As WinForm.Control In tba2'勾
tb.Enabled = False
Next
Else
For Each tb As WinForm.Control In tba1'没勾
tb.Enabled = False
Next
End If
Dim HTCG As WinForm.CheckBox = e.Form.Controls("HTCG") '设置窗口弹出时候,“合同初稿”相关
Dim tbS1() As WinForm.Control = {e.Form.Controls("SHYJ"), e.Form.Controls("HTDG"), e.Form.Controls("HTCD")}
Dim tbS2() As WinForm.Control = {e.Form.Controls("HTDG"), e.Form.Controls("HTCD"), e.Form.Controls("RWXD")}
If HTCG.Checked Then
For Each ts As WinForm.Control In tbS2'勾
ts.Enabled = False
Next
Else
For Each ts As WinForm.Control In tbS1'没勾
ts.Enabled = False
Next
End If
Dim SHYJ As WinForm.CheckBox = e.Form.Controls("SHYJ") '设置窗口弹出时候,“审核意见”相关
Dim tbW1() As WinForm.Control = {e.Form.Controls("HTDG"), e.Form.Controls("HTCD")}
Dim tbW2() As WinForm.Control = {e.Form.Controls("HTCD"), e.Form.Controls("HTCG"), e.Form.Controls("RWXD")}
If SHYJ.Checked Then
For Each tq As WinForm.Control In tbW2'勾
tq.Enabled = False
Next
Else
For Each tq As WinForm.Control In tbW1'没勾
tq.Enabled = False
Next
End If