Hello Grnhorn,
Here is the code;
- Code: Select all Expand viewCollapse view
Private oform1, oform2 as Variant
Sub Form1show
oform1 = createUnoDialog(DialogLibraries.Standard.Dialog1)
oform1.setPosSize(0,0,,,3)
oform1.execute
' You can Assign this macro a dialog1 buton or dialog1 event
Sub Form2show
oform2 = createUnoDialog(DialogLibraries.Standard.Dialog2)
oform2.setPosSize(0,200,,,3)
oform2.execute
End Sub
End Sub
The fifth parameter is for flag in our example set to 3
The description of flags adress is here.
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/PosSize.html Dialog1 and Dialog2 come from dialog editor's dialog modules,
setPosSize Methods' DetailssetPosSize
[oneway] void
setPosSize( [in] long X,
[in] long Y,
[in] long Width,
[in] long Height,
[in] short Flags );
Description
sets the outer bounds of the window.
Parameter X ; the x-coordinate of the window.
Parameter Y ; the y-coordinate of the window.
Parameter Width ; the width of the window.
Parameter Height ; the height of the window.
Parameter Flags
Flags are of type PosSize and specify, which parameters are taken into account when setting the outer bounds of the window.
This code is working well
Cheers.
