• Not Answered

Disabling ALT+F4 key combination in Operate.

Hi members, have any of you managed to inhibit ALT+F4 from closing DeltaV Operate, I've got some smart operators that have punched this windows feature! and need to resolve it so we can close the project.

I thought it was a simple as making a null VBA function to capture the key command, but DeltaV Operate only processes CTRL / SHIFT key combinations.

I got some code for keyboard hooks but I can't find a sutiable location in iFix VBA to invoke the hook.

Any ideas?

4 Replies

  • Adrian,

    This is not about DeltaV itself, but about "Windows" standard shortcut setting.

    The easiest way can be to "remap" this combination to start any different fuction - any "macro" ( you can map to this i.e. open text editor with shown text "DONT USE THIS AGAIN" :-) ). There is an topic which can help you:

    www.sevenforums.com/.../149549-disable-alt-f4.html

    www.techrepublic.com/.../101-212125

    Maybe exists any possibility to change this thru windows registers, but as far as I know microsoft it can be challenge :-).

  • In reply to Radomir Pistek:

    Adrian,

    My name is Youssef El-Bahtimy, I work for PROCONEX, the Philadelphia area Local Business Partner.

    I have been presented this challenge before on another control system platform, and solved it by replacing the vendor's native (faulty) key trapping function with one I built.  The application can integrate into DeltaV Operate (if necessary) with minimal scripting.

    Please contact me at [email protected] if you would like to know more.  

  • In reply to Youssef.El-Bahtimy:

    Youssef,

    is it possible to put this "script" to Emerson application exchange ( of course in case it is free of charge :-) )? Is it only for DeltaV Operate or can be fixed at any DeltaV node?

  • DISABLING ALT-F4 FOR A SPECIFIC WINDOW.

    ITEM: RTA000031440


    QUESTION:
    Is it possible to disable the use of ALT-F4 by X Windows for a single
    window? There is an application that makes use of Alt-F4 to mark text.
    When the combination is used, the window is closed, which is obviously
    undesirable.

    ---------- ---------- ---------- --------- ---------- ----------
    A: I successfully disabled the ALT-F4 window close action with
    AIX 3.2.3 extended (X11r5) using the following steps:

    To override the default window menu, I created my own menu.
    This entry was placed in my user's $HOME/.mwmrc defaults file:

    Menu BobDaveMenu
    {
    "Restore" _R AltF5 f.normalize
    "Move" _M AltF7 f.move
    "Size" _S AltF8 f.resize
    "Minimize" _n AltF9 f.minimize
    "Maximize" _x AltF10 f.maximize
    "Lower" _L AltF3 f.lower
    no-label f.separator
    "Close" _C f.kill
    }

    Note: This is exactly the same window menu as the DefaultWindowMenu,
    but the "AltF4" definition in the "Close" line has been removed.
    The BobDave menu is enclosed within curly brackets which may not
    translate properly.

    So that the window manager knows to use the BobDave window menu,
    I placed the following line in my $HOME/.Xdefaults file:

    Mwm*BobDave*WindowMenu: BobDaveMenu

    This instructs the window manager to use the BobDaveMenu for all
    windows with the resource name BobDave.

    To test the new definition, I restarted the window manager. I then
    used the -name flag to identify this particular aixterm with the
    resource name BobDave as below:

    aixterm -name BobDave

    Once the BobDave aixterm had been opened, it could not be closed with
    the ALTF4 key combination. These changes only affected the
    BobDave aixterm. No other operations of the BobDave aixterm were
    affected.

    When testing your question I made the following notes:

    -This test was unsuccessful with AIX 3.2.2 and AIXWindows 1.2.2.
    The problem was fixed with AIX 3.2.3 and AIXWindows 1.2.3 (X11r5.)
    It is possible that your application was already written to suppress
    the ALTF4 close action, but you may need to upgrade your
    AIXWindows lpp to obtain this fix.

    To suppress the AltF4 close action on AIXWindows 1.2.2, it was
    necessary to redefine the DefaultWindowMenu to us an alternative
    key combination to close the window. Unfortunately this change
    affected all the windows on that Xsession.

    -The 3.2.3 extended /usr/lib/X11/system.mwmrc, has a "NoAccWindowMenu"
    menu defined that has all the Alt actions removed. If you have
    further translation problems, it may be easier to use this window
    menu for your application as opposed to defining your own. This
    can be accomplished by assigning your application's resource name
    in your $HOME/.Xdefaults to use the NoAccWindowMenu.

    -You will need to find the resource name of your application.
    Once the resource name of you application has been obtained, simply
    replace the "BobDave" resource name from my example, with the
    resource name of your application.