Rony ,

For doing things when opening Formdocs i use 2 BASIC subs, maybe they can help you ?

Sub setDocPosSize(Doc As Object , X As long, Y as long , Width as long, Height as long )
   Dim Window As Object ' CONTAINER WINDOW
If IsNull(Doc) Or IsEmpty(Doc) Then Exit Sub

   Window=Doc.CurrentController.Frame.ContainerWindow
If Not (X=0 And Y=0) Then Window.setPosSize(X,Y,,,13)
   If Not (Width=0 And Height=0) Then Window.setPosSize(,,Width,Height,12)
   Window.setfocus
End Sub
Sub removeUnwantedToolbars(Doc As Object,Optional Allowed As Variant)
Dim Frame As Object
   Dim Layout As Object
   Dim I As Integer
   Dim strURL As String
'Allowed=Array("private:resource/menubar/menubar","private:resource/toolbar/formsnavigationbar") If IsMissing(Allowed) Or Not IsArray(Allowed) Then Allowed=Array() REM MISSING INVALID PARAM PASSED--CREATE EMPTY ARRAY TO REMOVE ALL
   BubbleSort(Allowed)
   Frame=Doc.CurrentController.Frame
   Layout=Frame.LayoutManager

   For I=0 To UBound(Layout.Elements)
       strURL=Layout.Elements(I).ResourceURL
       If BinSearch(strURL,Allowed)>=0 Then
           Layout.showElement(strURL)
       Else
           Layout.hideElement(strURL)
       End If
   Next I
End Sub

Greetz

Fernand
Hi there,

trying to find a means to learn about the position and size of document
windows via UNO (and the ability to move and resize the entire document
window). What would be the classes, interfaces to use?

Researched and experimented with XFrame (getContainerWindow,
getComponentWindow and their XWindowPeer's toolkit) and the parent of
the XFrame (using findFrame("_parent",) to get at the system's window in
which the container window resides, however the windows have 0 in their
respective dimension elements.

Tried to find the necessary information via various searches and in the
DevGuide, but have been unsuccessful so far.

Any kind soul who would give some pointers?
(Also, moving the entire window and resizing it via UNO would be a
necessity.)

TIA,

---rony






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to