Hello,
I will not be able to give you a precise formula for what you want. I can present a couple of methods to give you consistency.
With Base forms the are two sizes to consider. The View area and the Frame. The View area is recorded in the .odb form settings.xml file when the form is saved in Edit mode. This setting is used when the form is opened. However it can be affected by toolbars & menus. In form edit mode, you can re-size the form with more precision using the keyboard. Start with Alt
+ F8
. Then using the up/down or left/right arrow keys while holding the Ctrl
or Alt
keys (different precision) you can adjust the screen size.
You can control the Frame size with a macro. I use this method because of, as you mention, turning off menus & toolbars.
Here is the macro:
Sub Resize(iWidth,iHeight)
'Set the width & height of the form to be displayed
'Used because the tool bars are turned off elsewhere
'This cleans up the dead space
Dim vRect as Object
Dim intHeight as Integer
Dim intWidth as Integer
Dim intXPos as Integer
Dim intYPos as Integer
'With very slight modification, the routing may be altered for
're-positioning the window.
If IsNull(thisComponent.currentController.Frame) then exit sub
vRect = thisComponent.currentController.Frame.ContainerWindow.PosSize
intXPos=vRect.X
intYPos=vRect.Y
intHeight=(iHeight * 1.00)
intWidth=(iWidth * 1.00)
thisComponent.currentController.Frame.ContainerWindow.setPosSize(intXPos, intYPos, intWidth, intHeight, 15)
End Sub
You then just perform a call to the routine:
Resize(WIDTH, HEIGHT)
Now this is where I have a problem with exactness. I once found this measurement some time back but can’t seem to find it currently. It seems to relate to characters per inch/cm. My searching today shows approximately 48 = 1 inch or 2.54 cm so Resize(48, 48)
would then be a 1" X 1" or 2.54 X 2.54 cm window.
The only reference I can give is the XWindow interface.