Hide form window close button (x)

Creating and using forms
Post Reply
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Hide form window close button (x)

Post by Nocton »

I have a form which has its own close command button which is linked to a macro to ensure that another window/form is opened when the current one closes. I would like to prevent the window being closing by clicking on the close button/icon (x) in the top right-hand corner. Unlike Access, the form's properties window does not seem to allow this option. Is there another way of achieving this?

Regards, Nocton
OpenOffice 4.1.12 on Windows 10
F3K Total
Volunteer
Posts: 1039
Joined: Fri Dec 16, 2011 8:20 pm

Re: Hide form window close button (x)

Post by F3K Total »

Hi,
if you bind you "open macro" in Form-Edit-Mode e.g. to Tools/Customise/Events/View is going to be closed, you'll have what you want.
R
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Hide form window close button (x)

Post by Nocton »

Thank you for this work around, F3K Total, but I cannot get it to work. The form still closes, presumably because even after I open the form again the close down routine follows on.

Even if something like this could be made to work, I should still like to be able to remove the x from the title bar as it is much more user-friendly to prevent the user from doing something than to let them do it and then tell them they can't! Surely this must be possible in OO, especially as it is a basic feature of the properties of an Access form.
Can someone say whether this is possible or not?

Regards, Nocton
OpenOffice 4.1.12 on Windows 10
Post Reply