Form loading issue(s)

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.

Hello,

As for your toolbars and zoom screen redraw, do not see much in the way of eliminating this. Tried to lock controllers (see →
Re: How to disable screen update , change calculate mode on
) but saw no noticeable difference. Hardly saw any problem with zoom on my system. Toolbars is an issue as this is how the Base file is set. So if they are not saved on, no problem. If on need to display before removing. You can see this by starting the form as Visible=false then run the clear toolbars and set Visible=true. Toolbars will be there.

The screen resizing is another issue. This use to be a nicety in Base. When editing, set the form to the size and position wanted. Worked in v5.x and earlier. Then came v6.x and this → tdf#115619 but this wasn’t enough. During the v6.x releases further bugs were introduced further complicating the screen situation. This is even more complicated with the bug in Resize you are using - positioning requires special handling.

Frankly, it’s a wonder how some of this still works at all. Even when bug reports are submitted quickly and they are a regression, years (literally) later they still exist - untouched.

G’day @Ratslinger, thanks for the explanations. Yes, can be frustrating at times, all in all a great product, yet those subtleties can drive one up the wall.