Foxtable(狐表)用户栏目专家坐堂 → BeforeGetImage及时变换的问题


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

主题:BeforeGetImage及时变换的问题

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


加好友 发短信
等级:五尾狐 帖子:1173 积分:8777 威望:0 精华:0 注册:2012/4/18 16:28:00
BeforeGetImage及时变换的问题  发帖心情 Post By:2016/6/25 12:49:00 [显示全部帖子]

请教老师,以下代码写在BeforeGetImage,功能已经实现,但是,需要关闭一次窗口才能改变需要转换的图片,不能及时转换图片

想把以下代码写到TimerTick,但是报错,File 不是....的成员,请教老师怎样实现及时根据条件转换显示图片。

Dim pbx As WinForm.PictureBox = e.Sender
Dim lbl As WinForm.Label = e.Form.Controls("Label3")
If lbl IsNot Nothing Then
   Dim Count As Double
   Count = DataTables("任务分派").Compute("Count(项目编号)","任务人员 like  '%" & _UserName & "%' and (任务已读 not Like '%" & _UserName & "%' or 任务已读 is null)")
   If Count = 0 Then
        e.File = "Gnome-Colors-Emblem-Green.ico" '显示图片
    ElseIf Count >= 1 Then 
        e.File = "Gnome-Colors-Emblem-Desktop-Red-32.png" '显示图片
    End If
End If

 回到顶部