如果你表中有签核结果这列的话,可以根据aj2("签核状态")来识别应该用进度2.png还是进度1.png,
我的流程图是根据序号来识别的。
Dim But As WinForm.Button
Dim tb As Table = Tables(e.Form.Name & "_Table1")
For Each f As WinForm.Control In e.Form.Controls("g3").Children
e.Form.Controls("G3").RemoveControl(f.Name)
Next
Dim i As Integer = 30
For Each r As Row In tb.Rows
But = e.Form.CreateControl("But流程" & r("权限"), ControlTypeEnum.Button)
But.Text = r("权限") & vbcrlf & r("需签人")
If r("签核状态") = "Y" Then but.Enabled = False
But.Left = 5
but.Width = 75
but.Height = 45
But.Top = i
e.Form.Controls("G3").AddControl(But)
i += 90
Next
i = 75
For ii As Integer = 0 To tb.Rows.Count - 2
Dim jpg As WinForm.PictureBox
jpg = e.Form.CreateControl("Pb" & ii,ControlTypeEnum.PictureBox)
If tb.Rows(ii)("签核状态") = "Y" Then
jpg.ImageFile = "\向下14.png"
Else
jpg.ImageFile = "\向下15.png"
End If
jpg.SizeMode = ImageSizeMode.Zoom
jpg.Left = 20
jpg.Top = i
jpg.Width = 45
jpg.Height = 45
jpg.BackColor = Color.WhiteSmoke
e.Form.Controls("G3").AddControl(Jpg)
i += 90
Next
e.Form.Controls("G3").Visible = True
[此贴子已经被作者于2020/3/31 21:07:29编辑过]