Foxtable(狐表)用户栏目专家坐堂 → 在BeforeOpenProject 中为什么有的时候可以调用全局代码,有的时候不可以调用??知道的告诉下,谢谢了


  共有5175人关注过本帖树形打印复制链接

主题:在BeforeOpenProject 中为什么有的时候可以调用全局代码,有的时候不可以调用??知道的告诉下,谢谢了

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


加好友 发短信
等级:管理员 帖子:47480 积分:251289 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/6/4 15:31:00 [显示全部帖子]

你应该给个错误截图,否则没头没脑怎么看呢?

 

蒙一下, 估计问题出在这行:

 

ImageList.Images.Add(image(1) - 1,GetImage(image(0)))

 

改为:

 

Public ImageList As New System.Windows.Forms.ImageList()
Sub new
ImageList.ImageSize = New System.Drawing.Size(48, 48) '设置图标大小
Dim images As List(of String()) = DataTables("业务导航").GetUniqueValues("","节点图标","节点编号")
For Each image As String() In images
    If image(1)>"" Then
        If IsNumeric(image(1)) AndAlso image(0) > ""  Then
            Dim img As system.drawing.image = GetImage(image(0))
            If img IsNot Nothing
                ImageList.Images.Add(cint(image(1)) - 1,img)
            End If
        End If
    End If
Next
End Sub

 

 


 回到顶部