以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何有条件地设计控件的颜色  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=96391)

--  作者:zhangchi96
--  发布时间:2017/2/19 22:50:00
--  如何有条件地设计控件的颜色
在窗体中插入了控件:TextBox,名称为 “信息”

分别在事件Validating 和 BeforeSaveDateRow 中按一定条件设置 控件“信息”的字体颜色和背景颜色

请老师指导!

--  作者:有点色
--  发布时间:2017/2/19 23:50:00
--  

参考代码

 

If Forms("窗口1").Opened Then
    Dim txt As WinForm.TextBox = Forms("窗口1").Controls("textbox1")
    txt.ForeColor = Color.red
    txt.BackColor = Color.yellow
End If


--  作者:zhangchi96
--  发布时间:2017/2/20 22:49:00
--  
谢谢!