数据库打开时的script
默认得可以是打开800*600的帧结构
Type Rect
x1 As Long
y1 As Long
x2 As Long
y2 As Long
End Type
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowRect Lib "user32" (Byval hwnd As Long, lpRect As RECT) As Long
Sub Postopen(Source As Notesuidatabase)
'计算屏幕的分辨率,并转到相应的帧结构
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim r As RECT
Dim hWnd As Long
Dim RetVal As Long
Dim result As String
hWnd=GetDesktopWindow()
RetVal=GetWindowRect(hWnd,r)
result=r.x2-r.x1 & "x" & r.y2-r.y1
If result="1024x768" Then
Set uidoc=ws.currentdocument
Call uidoc.close
Call ws.openframeset("main1")
Exit Sub
End If
End Sub