Hi All, I have attached a PNG copy of a macro I use when accessing Base to automatically open a form. I would like to add code to this macro to either maximize the form or make it a full screen display (CTRL+SHIFT+J).
This I do not know how to do, so I would appreciate any assistance.
[Solved] Maximize Form on Opening
[Solved] Maximize Form on Opening
Last edited by Hagar Delest on Fri Jun 28, 2019 9:28 pm, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
I am using LibreOffice 6.2.4.2 on both Windows 10 and Linux Mint 19.1 Cinnamon. I also want my colleague to be able use the Base database on his latest Macbook
Re: Maximize Form on Opening
Please do not post any screenshots unless you have a display issue.
to be called after loading by some form event or document event (Tools>Customize)
Code: Select all
StarDesktop.CurrentFrame.ContainerWindow.IsMaximized = True
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 Form on Opening
Hi Villeroy, thanks for the quick response. I'm not sure where to place the 'new' line of code in the current macro that I am using in order to maximize the form once opened at startup. It make sense to place it after the line of code that actually opens the form - this I tried and nothing happened.
Some simple code to open a form and then maximize it would be fine.
Some simple code to open a form and then maximize it would be fine.
I am using LibreOffice 6.2.4.2 on both Windows 10 and Linux Mint 19.1 Cinnamon. I also want my colleague to be able use the Base database on his latest Macbook
Re: Maximize Form on Opening
Code: Select all
Sub MaximizeContainerWindow(e)
'globalscope.basiclibraries.loadlibrary("MRILib")
'mri e
win = e.Source.CurrentController.Frame.getContainerWIndow()
win.IsMaximized = True
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 Form on Opening
And for completeness, the same with a recorded full screen dispatch:
Code: Select all
sub FullScreen(e)
frame = e.Source.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "FullScreen"
args1(0).Value = true
dispatcher.executeDispatch(frame, ".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 Form on Opening (Solved)
Thank you very much for the help. The maximize macro did not work but the fullscreen macro works perfectly and does what I require.
I am using LibreOffice 6.2.4.2 on both Windows 10 and Linux Mint 19.1 Cinnamon. I also want my colleague to be able use the Base database on his latest Macbook