可以模拟任何事件。我想你的意思是,比如在时间到达、数据到达时,执行某事件程序?
我都是用LABEL的CHANGE事件:
SUB Lable1_change()
if label1="" then exit sub
'处理LABEL1内容,比如 CALL ...._CLICK()
label1=""
end sub
我都是用LABEL的CHANGE事件:
SUB Lable1_change()
if label1="" then exit sub
'处理LABEL1内容,比如 CALL ...._CLICK()
label1=""
end sub
节点与数据库当前记录的同步?
可以调用下面这个过程。
Private Sub TreeSelect()
'让当前节点呈选择状态 注意:TreeView1.HideSelection=False 才能看见
dim sKey as string '关键字
sKey=CStr(rstAll.Fields("产品ID")) '你希望被模拟单击的节点的关键字
TreeView1.Nodes(sKey).Selected = True
End Sub
Set nodX = TreeView1.Nodes.Add(,,"R","Root") '添加第一个节点。
Set nodX = TreeView1.Nodes.Add("R",tvwchild,"C1","Node " & CStr(i))
nodx.EnsureVisible'展开这个节点就象你用mouse点击效果一样。