1、LOTUS 程序精选1、用程序实现星期的转换:Dim workspace As New NotesUIWorkspaceDim uidoc As NotesUIDocumentDim doc As NotesDocumentDim dateComposedObj As New NotesDateTime(“Set uidoc = workspace.CurrentDocumentSet doc = uidoc.DocumentdateComposed = doc.DateComposedthisWeekday = Weekday(dateComposed(0)Select Case thisW
2、eekdayCase 1 : stringWeekday = “Sunday“Case 2 : stringWeekday = “Monday“Case 3 : stringWeekday = “Tuesday“Case 4 : stringWeekday = “Wednesday“Case 5 : stringWeekday = “Thursday“Case 6 : stringWeekday = “Friday“Case 7 : stringWeekday = “Saturday“End SelectMessagebox (“This document was composed on a
3、“ “GIF“;“c:notesdatabinary.gif“ 2、利用公式切换 ID :Command(UserIDSwitch)切换 ID3、显示工作站的权限:EditECL(“server“ : “names.nsf“; “4、显示存取控制表:Command(FileDatabaseACL)5、移至文件夹中:PostedCommand(Folder)6、利用公式清空垃圾箱:PostedCommand( )7、设置文本颜色:Command(TextSetFontColor)三、API 程序Notes API 程 序1、隐藏 Notes 的菜单:Declare Function GetAct
4、iveWindow& Lib “User32“()Declare Function GetMenu% Lib “User32“(Byval jjh&)Declare Function SetMenu% Lib “User32“(Byval h&,Byval m&)Dim ActiveWin As LongActiveWin=GetActiveWindow()Dim temp1 As Integertemp2=GetMenu(ActiveWin)Call SetMenu(ActiveWin,0)2、恢复隐藏 Notes 的菜单:Declare Function GetActiveWindow&
5、Lib “User32“()Declare Function GetMenu% Lib “User32“(Byval jjh&)Declare Function SetMenu% Lib “User32“(Byval h&,Byval m&)Dim ActiveWin As LongActiveWin=GetActiveWindow()Dim temp1 As Integertemp2=GetMenu(ActiveWin)Call SetMenu(ActiveWin,1)3、设置计算机名称:Declare Function SetComputerName Lib“kernel32.dll“ A
6、lias“SetComputerNameA“(Byval ipcomputername As String)As Longipcomputername=“my“temp=SetComputerName(ipcomputername)4、利用程序获取计算机名称及登陆用户名:Declare Function GetComputerName Lib “kernel32.dll“ Alias “GetComputerNameA“ (Byval lpBuffer As String,nSize As Integer)As LongDeclare Function WNetGetUser Lib “mpr
7、.dll“ Alias “WNetGetUserA“(Byval t$,Byval ttt$,Byval siz&)As LongDim lpBuffer As StringDim nSize As IntegernSize=48Call GetComputerName(lpBuffer,nSize)Print tt$Dim ttt As StringDim t As Stringt=“Call WNetGetUser(0,ttt,8)Print ttt5、关闭计算机:Declare Function ExitWindowsEx Lib “user32“ (Byval uFlags As Lo
8、ng, Byval dwReserved As Long) As LongConst EWX_LOGOFF = 0 显示“正在关闭计算机”Const EWX_SHUTDOWN = 1 显示“您可以正常关闭电源了”Const EWX_REBOOT = 2 重新启动Const EWX_FORCE = 4 强行关闭所有进程Const EWX_POWEROFF = 8 关闭计算机Const EWX_RESET = EWX_LOGOFF + EWX_FORCE + EWX_REBOOTSub Click(Source As Button)Call ExitWindowsEx(12,0):关闭计算机End Sub