View Full Version : 如何做到隔一段时间自动刷新视图?
mozhongluo
23-02-06, 02:00 PM
有没有办法使视图隔一段时间自动刷新?
利用notestimer class
在globals下建立的用户程序:
Sub elapsedTimerHandler(Source As NotesTimer)
Dim workspace As New NotesUIWorkspace
Call workspace.ViewRefresh
End Sub
在globals下的declarations全局变量声明:
Dim elapsedTime As Integer
Dim elapsedTimer As NotesTimer
%INCLUDE "lsconst.lss"
在视图的postopen中的记时程序:
Sub Postopen(Source As Notesuidocument)
Set elapsedTimer = New NotesTimer(10,"Elapsed time since opening document")
elapsedTime = 0
On Event Alarm From elapsedTimer Call elapsedTimerHandler
End Sub
这里是每隔10秒刷新一次,对于嵌入视图的情况也适用.
china_fankai
23-02-06, 04:01 PM
我用了1 樓的那個方法﹐好象沒有起作用呀
我沒有加上%INCLUDE "lsconst.lss"﹐一加上保存就出錯﹐不能保存﹐這個是什么意思呀?如何用呢?
定时代理
5分钟执行一次
dim session as New NotesSession
dim curDb as NotesDatabase
dim curView as NotesView
set curDb = session.CurrentDatabase
set curView = curDb.getView("XXX") 'XXX:your DataBase Name
call curView.refresh()
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.