Maximize document window - MS Windows only

Shared Libraries
Forum rules
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
Post Reply
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Maximize document window - MS Windows only

Post by DrewJensen »

For MS Windows only

The following macros can be used to open a form in a maximized state:

Code: Select all

'
' use the MS Winows API
'
' Add this section to the beginning of 
' the basic module where you add
' the actual work procedures
'
Declare Function ShowWindow Lib "user32" _ 
(ByVal lHwnd As Long, _ 
ByVal lCmdShow As Long) As Boolean 


'
' This is procedure that does the actual work
' 
sub MaximizeFrame( aFrame as object ) 
    dim window 
    dim handle 

    window = aframe.getContainerWindow() 
    handle = window.getWindowHandle(dimarray(), 1)  REM 1=WIN32 
    ShowWindow( handle, 3 ) 

end sub 

'
' Here is a helper procedure for doing this
' with an embedded data entry form in
' Base
'
' 
' In the form designer window 
' select any control 
' right click and select Form
' on then event property page 
' you want to assign the "When loading" 
' event to this procedure
' not the actual work procedure above.
'
sub onWhenLoading( oEvent as object ) 

   MaximizeFrame( oEvent.Source.Parent.Parent.CurrentController.Frame) 

end sub
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
morry
Posts: 1
Joined: Wed Aug 06, 2008 3:24 pm

Re: Maximize document window - MS Windows only

Post by morry »

Hi,

I found this about maximizing Ubuntu, i hope it will help
http://www.fixya.com/support/t850099-maximize_ubuntu

Cheers,
Morry.
OOo 2.3.X on Ubuntu 8.x + windows
Post Reply