How to disable CTRL+F8 on Dynamics NAV Form?

I have written about how to enable Tools > Zoom function in Dynamics NAV. I have also pointed out the weakness of using Tools > Zoom function (for example, when hiding passwords). However, there is a way to disable keyboard shortcut CTRL+F8 on a specific form.

How to disable CTRL+F8 on Dynamics NAV Form?
Add new MenuButton to the form (click on Toolbox button, then click on Menu Button, then click on the form, where you want to add Menu Button):
Disable Tools Zoom - Add new MenuButton

Create new Menu Item and define the ShortCutKey to Ctrl+F8 (right-click on new Menu Button, select Menu Items, create a new entry by defining Caption (Disable Zoom Function) and ShortCutKey (CTRL+F8) properties, but leaving Action and RunObject properties blank):
Disable Tools Zoom - Define Name for Menu Button

Resize Menu Button to a very small size (so, you could hide it behind one of the other existing buttons on the form)
Disable Tools Zoom - Resize Menu Button

Drag new Menu Button on one of existing button on the form, and click Format > Send to Back (this will position your new MenuButton under the button):
Disable Tools Zoom - Format Send to Back

Now, if you would run the form again, and try to click CTRL + F8, nothing will happen. Result!

Unfortunately, user will still be able to click Tools > Zoom… (which I was hoping would not work either, but it does!) I wonder, if there is a way to disable Tools > Zoom functionality for a specific form…

Edited on 06/12/2011 21:45 (as per Peter’s request) – WARNING:
Disabling keyboard shortcut CTRL+F8 does not remove the ability to run Tools > Zoom function directly. Therefore, this wokaround should not be used for controlling security. Instead, this post should be taken as example, of how to control ShortCutKey property.

This entry was posted in development, Dynamics NAV / Navision and tagged , , , , , , . Bookmark the permalink.

5 Responses to How to disable CTRL+F8 on Dynamics NAV Form?

  1. Peter says:

    PS: You should actually remove your walkthrough or put HUGE warnings signs on it, as it only provides a false security. (Sorry)

  2. Peter says:

    Great, thanks 🙂

    However; there IS a way to disable Zoom per table. Just use this trick:

Leave a Reply

Your email address will not be published. Required fields are marked *