Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stop Window Closures

Featured Replies

I want to break some fingers. I want to be sure they have filled out a record right before they are allowed to leave it. I have script to check their entries. But instead of using my button to Close, they x on the dumb window and leave things undone. How can I stop them? Does 7 have ability to let me keep control and not let them close it until I let them? I didn't notice it before because I never used windows like I am in 7. Not sure how to control our staff.

Pete

SecureFM plug-in will allow you to prevent closing (or quiting) the file via key board commands or via the menus.

jfmcel is right. The short answer to your question is "No". You need a plug in. I have 100+ users that get click happy with the little X in the corner as well.

You can do a more complicated work around instead of a plug in. Simply write a script that takes the user into the layout for data entry, then send the script into a loop with a pause, and only exit loop if... whatever the criteria is you set forth.

A looping script will lock up the record and not let them "X" out of it. There are several more tricks and stipulations to this technique that's been explained on the boards a couple of times. I've used this in a couple of situations and it works great... and added bonus is that it takes away a lot of the options in the menus when the script is looping. I thought there was an article about this on the ISO magazine's website, but I can't be certain.

  • Author

Thank you both for helping. Yeah. I've used various things. Was considering Window Utility until 7 came out. I hoped 7 had some additional ways to help me out. I read through all Get Window etc but didn't see anything.

Too bad we can't attach a script to a Close Window like we can in Edit where you can make a script run on closing the file. That would be great. grin.gif

Thanks any way guys.

Pete

I have been able to disable the Windows Close button thru the use of a small WinBatch EXE- Filemaker can't be closed down this way after the EXE is run. However, I haven't been able to prevent users from cloing individual files. Since I use Dacons Menu Control to create runtimes, and the runtime itself doesn't allow the user to close individual files...the 3 Window buttons for individual files are removed, what I have works just fine in a runtime. While Secure FM will remove the buttons, it is incompatible with MenuControl. If anybody would like the exe, let me know.

Steve, I would like a copy of that... can it be undone to restore that function?

Hi Roger: It doesn't permanently change the button. You would need to call it at the beginning of the runtime everytime. All it does is zero a flag in User32.DLL. I could have also included a method to turn it off from within FM but I didn't see the need.

I'll email you the EXE and a small FP5 test file.

Steve

Hi steve, can you send me a copy of it, i think i also need it for some project.

Thank you

Regards,

Henry

  • Author

thanks for the ideas guys. This sounds like what I need. Any way you could just post it for us? It sounds like lots of people will be asking you. I appreciate the help. smile.gif

Pete

Here is the StopClose.zip. Run the small test program. Remember that it will only work properly in a runtime. Also, I have only run it on XP altho it should work with other versions of Windows.

StopClose.zip

  • Author

oh darned, Steve, I didn't go with runtime - needs to be networked. Anything else I can do similar to what your suggesting but not with runtime?

The problem is that I haven't been able to prevent a user from closing an individual file. Since the runtime doesn't appear as having individual files disabling the close button on the application works. The only other way that I can think of is trying to hack into FM, which is both prohibited and beyond me.

Steve

Closing an individual file is okay, though, since an on close script will be performed. Clicking X on the application is what causes problems and trashes files quickly. Disabling that is what I would consider most important.

Closing an individual file is not OK. What happens if the user has been entering data but the data has not yet been validated and saved (assumming he's entering in globals)? Sometimes he's entering data into a record. You might wind up with a partially complete record and un-validated. You can't run a script on exit, cause you don't know what the user was doing when he hit the close button.

Steve

What if the computer crashes or gets unplugged?

I try to take "Incomplete" records into account by using status flags.

  • Author

I found an answer!!! I think! For me at least! I've been considering kiosk, using Menu Control, WindowUtility etc. Some don't go with others (they don't like each other) and I want to activate scripts on exiting etc.

Check this out! I thought i'd have to buy three plugsins to do all this...

You can rename menu items or remove them all. YOu can stop close/exit from windows, execute script when active window changes, activate scripts from calcs or tabbing from field - everthing I've been struggling with for six months.

I thought Secure FM was just for passwords. But it isn't. And it also has Menu Control built in.

Secure FM with Menu Control

Oh very excited. I'm going to order it but I'll try to wait a few days in case anyone knows something I should consider first. And I'm not clear that, if I order it now, I can start using it in my new 7 design. Does anyone understand that part? Very cool though. cool.gif

Pete

Isn't that what I recommended about a week ago? ;-)

  • Author

My apologies, John. You said, "SecureFM plug-in will allow you to prevent closing (or quiting) the file via key board commands or via the menus."

I didn't see that you meant specifically windows and windows was what I was focusing on. Sorry. crazy.gif

But you are certainly correct! I'm glad you mentioned it again. I clicked some other link for some other product on some other forum and bang! I was there staring at it! And the price is great too! Didn't know SecureFM did WINDOWS!!! grin.gif

Thanks very much for helping me guys. FM rocks. wink.gif

Pete

Simple, you test if they are on such a layout in your on close script.

If [PatternCount(Status(CurrentLayoutName), "global")]

Set Field [prefs::incompleteRec, prefs::incompleteRec & ID & "

  • 1 month later...

Hey Steve, any chance you could add another script to enable the dll flag? It would be nice to be able to activate this on close, so that a user doesn't have to learn Ctrl-Q or Alt-F4, which I'd rather they wouldn't anyway. wink.gif

Nevermind, my sys admin just did it for me. smile.gif

I'll look into it. Give me a few days.

Steve

Here is RestoreClose.zip. Run it the same way. Please let me know if you have a problem.

Steve

RestoreClose.zip

My SA went to the WinBatch list of which you're a member, figured out the details, and did it for me last night. Thanks, though. smile.gif

  • 1 month later...

I'm relatively new to this forum and a little late to this particular discussion but for my 2 cents...

I've been using SecureFM for more than 2 years now and find that it is very stable and is an indispensable tool to keep users from doing real damage in the countless ways that they seem to find so effortlessly. I use it in a networked environment with both Macs and PC's with all solution files hosted on an Xserve running Filemaker Server 5.5 - it's really worth the price you have to pay for a plugin solution. It's a bit trickier programming for novice or novice/intermediate developers but gives you a level of control and security just not available any other way.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.