Win 10 Lo 6.4.7 HSQL2.51
Hi,
Having trouble with some basics
This is sort of a multipart question because all resulting in one issue, forms not loading in clean fashion.
The typical macro attached to a forms Tools, Customize, Event, Open Document may look like
Sub prep
oController = ThisComponent.getCurrentController()
oFrame = oController.getFrame()
oContainerWindow = oFrame.ContainerWindow
oContainerWindow.isMaximized = True
call RemoveToolbars
call zoom90
End Sub
as
1 I maximize all forms with the exception of smaller forms on top of a calling form
2 Turn off Toolbars and the Menubar, at times change the text in the titlebar
3 Apply a certain zoom level
All this is working, however from a pedantic view the issues are as follows
Toolbars
Sub RemoveToolbars
rem If Design mode, just exit the routine and display standard menu
xCurrentController = thisComponent.CurrentController
If xCurrentController.isFormDesignMode Then
Exit Sub
End If
xLayoutManager = thisComponent.CurrentController.Frame.LayoutManager
xLayoutManager.visible = false
xLayoutManager.HideElement("private:resource/menubar/menubar")
End Sub
The macro works great, trouble is, if a previous form was saved with toolbars visible, the toolbars will pop up
in the new form for a second and the screen repositions itself rather then opening up not displaying them at all.
Same is true if another database had toolbars on. Only fix appears to be manually turning all toolbars off and
saving the file before reopening.
Zoom
Sub zoom82
Thiscomponent.currentController.ViewSettings.ZoomType = com.sun.star.view.DocumentZoomType.BY_VALUE
Thiscomponent.currentController.ViewSettings.ZoomValue = 82
End Sub
Once the toolbars have disappeared zoom works correctly by re adjusting the form, which can take another second or 2
sometimes rendering the form in sort of double vision for a split second.
Not sure if there is a work around.
Now if a maximized form calls a special sized one on top
Sub SetFormReps
oCurrentController = ThisComponent.getCurrentController()
oFrame = oCurrentController.getFrame()
oFrame.Title = "Report Menu"
call RemoveToolbars
Resize(380,200,580,330)
zm90
End Sub
The form first opens up maximized, takes a second to adjust its size and position and another sec to zoom
So the question is can I break up the prep macro over different events all running before the form is displayed in its final shape ?
Any other ideas, solutions or work around, the main concern being those toolbars or could it be just the Intel Graphics Adapter ?
Thank you
NB: I realize that perhaps that should be multiple posts, alas its all sort of interrelated.