Foxtable(狐表)用户栏目专家坐堂 → DrawCell显示图片问题


  共有3800人关注过本帖平板打印复制链接

主题:DrawCell显示图片问题

帅哥哟,离线,有人找我吗?
realredred
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:488 积分:3358 威望:0 精华:0 注册:2013/4/17 21:14:00
DrawCell显示图片问题  发帖心情 Post By:2013/9/28 14:18:00 [只看该作者]

利用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里的插图代码?


 回到顶部