I"m not sure if I’m using the correct terminology, so I’ve added an Image below to point it out (Yellow and Blue Arrow)
Is there a way to change/remove the Exit,Max,Min buttons, along with the Title, in the windows title bar?
Thanks.
I"m not sure if I’m using the correct terminology, so I’ve added an Image below to point it out (Yellow and Blue Arrow)
Is there a way to change/remove the Exit,Max,Min buttons, along with the Title, in the windows title bar?
Thanks.
For removing the Min, Max buttons use a macro which at the start of the odb, minimizes the Libreoffice window to the taskbar while opening a “Main Menu” form. The close X will remain however. A solution for the title bar will follow soon after this post!
Sub winLOMin()
Dim objA, objB, objC
objA=thisDatabaseDocument.formDocuments()
If objA.hasByName(“Main Menu”) then
objB=objA.getByName(“Main Menu”)
Else
Exit sub
Endif
objC=thisDatabaseDocument.currentController()
objC.connect()
doEvents
objB.open()
doEvents
objC.frame.containerWindow.isMinimized()=true
End Sub
Thank you for getting back to me.
I think that I’m missing something (probably something asinine) . I’ve added some message boxes (as you will see), and when this is run, I’m getting the “Exit Sub” message. In design mode or not, same message. Thoughts?
Sub winLOMin()
DIM objA, objB, objC
objA=thisDatabaseDocument.formDocuments()
If objA.hasByName(“MainForm”) then
objB=objA.getByName(“MainForm”)
Else
msgbox(“Exit Sub”)
Exit sub
Endif
objC=thisDatabaseDocument.currentController.connect()
objB.open()
doEvents
objC.frame.containerWindow.isMinimized()=true
msgbox(“Finished”)
End Sub
The msgbox is a good debug tool! Looks like you have the wrong Form name! What is the name of the database Form that you want to open along with the odb? Mine is “Main Menu”. Yours may be something else. “MainForm” is usually the name of the first control within a database form, followed by “SubForm” and so on… These are typically not names given to database forms. The database form name is the name you gave the Form when it was created and is now in the database Forms list (LO Base main window - Forms). For example, my “Main Menu” database form has its first control named “MainForm” and a second subform control named “SubForm”. These have nothing to do with the database form name as they are merely control or controller names. My form name is “Main Menu”. I also have other database forms named “Businesses”, “Contacts”, etc…)
Yes, having them both called form is very confusing. My DB Form title is Frm_MainForm so THAT was an easy fix. However…
Replace the code in proximity to the errant highlighted code with these lines:
I received the msg “Finished”, LO is minimized, but the min/max buttons are still present.
(Don’t worry about missteps, I have them all the time lol)
Yes, there is a part two… working on it. Mainly about hiding the menus on the form.
Try appending these lines after objD.isMinimized()=true:
Nothing changed after adding those lines and adding objE.
The min/max buttons still work as well.
(Code is so much fun haha)
Updated previous post!
Gotcha. I’m on it.