09-04-2012 04:57 PM
Copied CustomShortcuts from LabVIEW.ini into the .ini file of my exe:
[MYEXE]
CustomShortcuts=";APP_FULL_SIZE,F11"
It seems not working.
Anyone did this before?
I'm using LabVIEW 2011 /WinXP.
TIA
09-05-2012
11:38 AM
- last edited on
04-30-2025
04:20 PM
by
Content Cleaner
Hi there, have you consider .rtm files over .ini? I think it would be much easier.
09-05-2012 01:43 PM
I'm using .rtm
This is NI menu item, not a cutomer item.
To customize the shortcut of this item, you need to add an entry in the .ini.
09-06-2012 02:47 AM
LabVIEW's default Menu items will not work inside EXE. Only custom Menu items will work inside a build application. To have custom shortcuts for your build application, create a Runtime Menu (.rtm) file and link to the Main VI of your EXE. You only have to handle all the menu selection actions. You can have shortcuts for each menu item too. This is because, menu function like "Creating New VI" (Ctrl+N) is available only in development environment and not inside an EXE. You can use default menu items only if you run as LabVIEW vi.
09-06-2012 10:07 AM
Thanks for reply, Anand.
Some LabVIEW default menu items DOES work inside EXE. For example, the one I'm using: Full Size. It works fine with "Ctrl+/". I just want to use F11 instead of "Ctrl+/".
I AM USING .rtm.
09-06-2012 10:48 AM
If you change it locally to your development environment in tools->options menu shortcuts, then compile the executable, does it compile the shortcut into it? Or does it revert to the default? I suppose I could come down to your office and talk to you...haha
09-06-2012 11:00 AM
@for(imstuck) wrote:
If you change it locally to your development environment in tools->options menu shortcuts, then compile the executable, does it compile the shortcut into it? Or does it revert to the default? I suppose I could come down to your office and talk to you...haha
Don't try this..it doesn't work.
03-18-2020 08:09 AM - edited 03-18-2020 09:05 AM
Anyone found a solution for this?
I'm trying to stop CTRL+W from closing my windows.
I can of course catch the combination and discard, but I have tons of windows. They all run in a template that could catch CTRL+W, but some windows (VIs loaded in a subpanel) actually use CTRL+W for some custom actions (and discards the keys).
So there are workarounds, but none of them are practical.
Any reason why CustomShortcuts shouldn't work in executables?
EDIT: Found a workable solution: In my template (that is cloned for every window) I catch the "Menu Selection? (App)" event, and discard it. This will stop CTRL+W from closing my window, and the VI in the subpanel still gets key down events for the ctrl and w.
03-18-2020 07:43 PM
Have your tried to create a user menu item with Ctrl+W as shortcut?
The new menu item will "steal" the shortcut from the application menu item.
The menu shortcut works even menu not visible.
03-19-2020 03:26 AM
@zou wrote:
Have your tried to create a user menu item with Ctrl+W as shortcut?
The new menu item will "steal" the shortcut from the application menu item.
The menu shortcut works even menu not visible.
I did just now. That works too.
Before I also tried a custom menu that implemented APP_CLOSE, but did not have a shortcut. That didn't work. Removing the shortcut works in the IDE...
Discarding the menu selection (app)? event works perfectly for me. Your solution makes it do a no-op. I like not having a rt-menu, but it's good to have options!