代码如下:
Declarations Section Of Form To Be Loaded In Dialogbox:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (Byval
lpClassName&, Byval lpWindowName$) As Long
Declare Function SetWindowPos Lib "user32" (Byval hwnd As Long, Byval hWndInsertAfter As Long, Byval x As Long, Byval y As Long, Byval cx As
Long,Byval cy As Long, Byval wFlags As Long) As Long
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
'PostRecalc of Dialogbox Form
Sub Postrecalc(Source As Notesuidocument)
Dim myhWnd%
'class name and title of dialog box
'Step 1 --> get window handle
myhWnd = FindWindow(0, "Specify a Material Number and Batch Number")
' Parms 3 and 4 are x and y,
' Parms 5 and 6 are window width and height
'Parm 7 is constant Hex value for what you want to do with active window
'Step 2 --> Set window position by window handle
SetWindowPos myhWnd, -1, 165, 15, 725, 300, SWP_SHOWWINDOW
End Sub