quarta-feira, 6 de outubro de 2010

Maximizar forms no Base do OpenOffice


As seguinte macros, usadas em conjunto, maximizam um forms para full screen.


sub onWhenLoading( oEvent as object )
MaximizeFrame( oEvent.Source.Parent.Parent.CurrentController.Frame)
end sub

Declare Function ShowWindow Lib "user32" _
(ByVal lHwnd As Long, _
ByVal lCmdShow As Long) As Boolean

sub MaximizeFrame( aFrame as object )
dim frame
dim window
dim handle
window = aframe.getContainerWindow()
handle = window.getWindowHandle(dimarray(), 1)
REM 1=WIN32
ShowWindow( handle, 3 )
end sub

A macro "sub onWhenLoading" deve ser linckada ao evento "durante o carregamento" do forms.