Maximize Writer window

Creating a macro - Writing a Script - Using the API

Maximize Writer window

Postby AndrewZ » Sun Jun 15, 2008 7:33 pm

I am looking for a cross-platform (Linux/Windows) method to maximize the Writer window equivalent to WIN32 API's ShowWindow() with SW_MAXIMIZE.

I found previous discussion on http://www.OOoForum.org . There was discussion that in 2.0 there would be a way to do this, but then it turns out the announcement was wrong or misunderstood.

I thought I'd try one more time. :)
<signature>
* Did you solve your problem? Do others a favor: Post the solution
* Visit OpenOffice.org Ninja (blog) and OpenOffice.org Ninja Wiki for news, previews, troubleshooting, etc.
</signature>
OOo 3.0.X on Fedora 9 + XP
User avatar
AndrewZ
Volunteer
 
Posts: 633
Joined: Mon Oct 08, 2007 1:25 am
Location: Colorado, USA

Re: Maximize Writer window

Postby pitonyak » Mon Jun 23, 2008 3:37 am

The best that I have seen is to use ".uno:FullScreen" with a dispatch. This will toggle full screen and not full screen (which is not the same for sure). Another solution was to explicitly set the size yourself, something like this:

Code: Select all   Expand viewCollapse view
Sub reSize(X As Integer, Y As Integer)

Dim aSize As New com.sun.star.awt.Size

aSize.Width = X
aSize.Height = Y

thisComponent.CurrentController.Frame.ContainerWindow.setOutputSize(aSize)

End Sub
Andrew Pitonyak
http://www.pitonyak.org/oo.php
LO and AOO on Fedora
pitonyak
Volunteer
 
Posts: 186
Joined: Sun Oct 07, 2007 9:13 pm
Location: Columbus, Ohio, USA

Re: Maximize Writer window

Postby pitonyak » Tue Jun 24, 2008 2:21 pm

I have been looking through the source code for OOo 3.0, and it has support for some VBA structures. It may be possible to minimize and maximize using a VBA concept. The FullScreen dispatch is really meant for presentations (at least that is my opinion), and it obscures the entire screen, which is a little more than you usually desire (you want to see the top and bottom lines as well as the program title bar).
Andrew Pitonyak
http://www.pitonyak.org/oo.php
LO and AOO on Fedora
pitonyak
Volunteer
 
Posts: 186
Joined: Sun Oct 07, 2007 9:13 pm
Location: Columbus, Ohio, USA


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 6 guests