LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CustomShortcuts in exe

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

 

 

George Zou
0 Kudos
Message 1 of 13
(4,175 Views)

Hi there, have you consider .rtm files over .ini? I think it would be much easier.

Alejandro C. | National Instruments
0 Kudos
Message 2 of 13
(4,150 Views)

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.

 

George Zou
0 Kudos
Message 3 of 13
(4,136 Views)

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.

 

 

Anand kumar SP
Senior Project Engineer
Soliton Technologies Pvt Ltd
0 Kudos
Message 4 of 13
(4,112 Views)

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.

 

 

George Zou
0 Kudos
Message 5 of 13
(4,098 Views)

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

0 Kudos
Message 6 of 13
(4,093 Views)

 

@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.

0 Kudos
Message 7 of 13
(4,089 Views)

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.

Message 8 of 13
(3,507 Views)

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.

 

 

George Zou
Message 9 of 13
(3,486 Views)

@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!

Message 10 of 13
(3,467 Views)