Jump to content

Can the red Windows "Close" button be disabled?


This topic is 2878 days old. Please don't post here. Open a new topic instead.

Recommended Posts

My MarinaPro solution utilizes 14 relational windows based filemaker tables.  I have an occasional customer who, as a result of custom, uses the window "Close" button to exit Filemaker instead of a layout "Quit" button provided.  This I would like to prevent.
 
I have been able to create a script the will disable the "Close" command under the "File" menu bar command; but is it possible to create a script that will disable the windows "Minimum", "Max/Restore" and "Close" buttons located in the upper right hand corner of an open Windows layout window?
 
Thank you for any help.
Link to comment
Share on other sites

HI JH

 

,Are you still on version 11?  On 11 you can still use script trigger OnWindowClose to stop people from exiting but it doesn't remove the red 'x'.

 

If you can move to 12 or preferably 13, you can use the new window controls where you can actually remove Close, Minimize, Zoom and more.  You do this when you use the script step "New Window".  You can also make the window a dialog which means it is modal and they can't leave it until they do what you want.

 

Be careful when using these new window controls.  Be sure to leave yourself an exit button ON these new windows, at least until you are sure they work as you expect.

 

corrected - OnWindowClose or OnLastWindowClose

Link to comment
Share on other sites

Thanks guys, big help.

 

Converted my FMP 11 solution tables to FMP 12 for testing purposes.

 

My startup script is "Go to Layout ["Splash Start"]", then "New Window [style: Document]".  Then, the startup continues to the Main Menu layout.

 

Result is good, red 'Close" button has been deactivated.  However, when I "Hide" the "Main Menu" layout (Marina.fmp12 table) to goto "Customers List View" layout (Cust.fmp12 table), and return to "Main Menu", the red window "Close" button is again activated on "Main Menu" layout.

 

Does this mean I need a "New Window" after every layout change?  I hope not.

Link to comment
Share on other sites

Here is my simple solution to defeat the "Close" command and red "Close" button in Filemaker.  Using the "New Window" advanced options was just to much extra work.
 
Create Script Named: Do Not Allow Close Command
 
Use these Script Elements:
 
Comment: This script will de-activate the File Menu CLOSE function and the CLOSE button because it ''does nothing''.  This is accomplished via the Filemaker Advanced Tools, Custom Menus.
 
Beep
 
Show Custom Dialog ["CLOSE Window Alert"; "For security the ''Close'' command function has been disabled.¶¶Please use the ''Quit'' command to exit this database solution..."]
 
Then, from the Filemaker menu bar select Tools/Custom Menus/Manage Custom Menus...
 
Under Menu Name select "File", then the "Edit" button.
 
Under Menu Items select "Close".
 
Place a check mark in "Action", then select "Specify".  Select "Perform Script, then "Specify" the script named "Do Not Allow Close Command".
 
Back out via the "OK" buttons and your done.  Repeat for each Filemaker table in your solution.
 
This will work in at least Filemaker 11, 12 and possibly 13 (Have not tried using Filemaker 13 Yet).
Link to comment
Share on other sites

My startup script is "Go to Layout ["Splash Start"]", then "New Window [style: Document]".  Then, the startup continues to the Main Menu layout.

 

Result is good, red 'Close" button has been deactivated.  However, when I "Hide" the "Main Menu" layout (Marina.fmp12 table) to goto "Customers List View" layout (Cust.fmp12 table), and return to "Main Menu", the red window "Close" button is again activated on "Main Menu" layout.

 

Does this mean I need a "New Window" after every layout change?  I hope not.

 

No, but every open window needs the Close removed. After the New Window, you need to select the original window and close that.

Link to comment
Share on other sites

This topic is 2878 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.