利用DrawCell
成功的每行显示图片
此主题相关图片如下:未命名.jpg

因为图片源是局域网
当图片源的电脑未开,或者局域网不稳定而未能联网
那麼项目就变得很卡
于是想过是,当图片源不能联通时,不执行显示图片代码
但加入了后无限卡住了
If e.Table.name = "排产窗_Table1" Then
Dim ip As String = "" & Tables("主页")(0, "图片") & "\" & ""
Dim picip As String = "192.168.0.228" ' "\\192.168.0.228\img\工艺图\" '"\\Jc82\img\工艺图\" '
If Network.Ping("" & picip & "") Then
If e.Col.Name = "PICT" Then
If e.Row.IsNull("模号") = False Then
If FileSys.FileExists(ip & e.Row("模号") & "-Q.jpg") = True Then
e.StartDraw
Dim img As Image = GetImage(ip & e.Row("模号") & "-Q.jpg")
e.Graphics.DrawImage(img, e.x, e.y,40,40)
e.EndDraw
End If
End If
End If
End If
End If
結果失败了
还有什麼方法可以在断网时,不执行DrawCell里的插图代码?