在窗口中设置一个图片框,在BeforeGetImage中设置如下代码,每次进入窗口时都没有问题,可点击窗口中的“上一条”、“下一条”时图片有时不随着变化,有时变化的也不对
Dim pbx As WinForm.PictureBox = e.Sender
Dim r As Row = Tables("合同主表").Current
If r IsNot Nothing Then
If r("欠钱") = False Then
e.File = "欠钱.png" '显示已过期印章图片
Else
If r("货款冻结") = True And r("货款解冻") = False Then
e.File = "货款冻结.png" '显示已货款冻结印章图片
Else
If r("货款冻结") = True And r("货款解冻") = True Then
e.File = "已解冻.png" '显示已已解冻印章图片
Else
If r("过期") = True And r("货款冻结") = False Then
e.File = "过期.png" '显示已过期印章图片
Else
e.File = "" '不显示图片
End If
End If
End If
End If
End If