Maximize Window in macro
Maximize Window in macro
How to maximize window, using a macro? Without using WindowsAPI
Last edited by kapbepucm on Fri Feb 13, 2009 1:28 pm, edited 3 times in total.
OOo 3.0.X on Ms Windows XP + Ubuntu 8.10
Re: Maximize Window in macro
The position and size of the WIndow is outside the scope of the office-API. OOo is platform independent. Under WIndows you can call the Windows-API from Basic, but that's not what you want.
A recorded macro dispatching menu:View>Full Screen
A recorded macro dispatching menu:View>Full Screen
Code: Select all
sub FullScreen()
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "FullScreen"
args1(0).Value = true
dispatcher.executeDispatch(document, ".uno:FullScreen", "", 0, args1())
end sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Maximize Window in macro
Villeroy wrote:The position and size of the WIndow is outside the scope of the office-API.
Code: Select all
thisComponent.CurrentController.Frame.ContainerWindow.setPosSize(0,0,750,550,15)
OOo 3.0.X on Ms Windows XP + Ubuntu 8.10
Re: Maximize Window in macro
OK, you are right. It can set it's position and size without knowing anything about the availlable size of the output device(s).kapbepucm wrote:Is it "outside the scope of the office-API"?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Maximize Window in macro
I know my availlable size of the output device. (800X600) But anyway [setPosSize] does not do so, as the WindowsAPI.
What should I do in Ubuntu?
What should I do in Ubuntu?
OOo 3.0.X on Ms Windows XP + Ubuntu 8.10
Re: Maximize Window in macro
Code: Select all
thisComponent.CurrentController.Frame.ContainerWindow.setPosSize(0,0,750,550,15)
That has been discussed frequently on oooforum.org.
http://www.oooforum.org/forum/search.phtml
Search for all keywords "maximize window" in the API-forum.
Let the user arrange his workspacekapbepucm wrote:What should I do in Ubuntu?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Maximize Window in macro
They say that this is not possible.That has been discussed frequently on oooforum.org.
http://www.oooforum.org/forum/search.phtml
Search for all keywords "maximize window" in the API-forum.
OOo 3.0.X on Ms Windows XP + Ubuntu 8.10