LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom menu bar for windows 10

I'm trying to build a custom menu bar.  I've enclosed the code in a PNG file.  The custom menu bar behaves inconsistently.  Sometimes I see the standard menu bar selections and sometimes only my custom ones.  Always the only options available under the menu bar are my custom options.  I've used this code before and it's worked but not in a LV 2016 and Windows 10 environment.  Could I be missing something?  I've had admin issues with my machine.  I'm not the admin.  Could that be effecting it?

0 Kudos
Message 1 of 13
(3,720 Views)

Where's the rest of the code? Running this snippet of course will revert back to the edit menu within nanoseconds. Can you show us in more details how you are using it?

0 Kudos
Message 2 of 13
(3,699 Views)

If you want your menu bar fixed, you're better of using Edit>Run-Time Menu. That would create a .rtm file, specifying your VI's menu.

 

Even if you want to make changes, it's often easier to start with a customized menu, specifying most of the fixed stuff, and programmatically make changes to that.

 

Doing it your way should work, but the menu won't be set until you call this code. So indeed, we'd need to see the hole program.

0 Kudos
Message 3 of 13
(3,652 Views)

here us where the code resides in my application.  I've given the basic structure of my VI.  The menu is never modified again.  If I have to resort to the menu editor … I just would rather do it programmatically.

0 Kudos
Message 4 of 13
(3,617 Views)

OK, so I've run it 10x and it always gave the custom menu. How do you generate a case where it does not?

 

0 Kudos
Message 5 of 13
(3,604 Views)

I've enclose a version of my code.  The main VI is MainGUImin.vi.  Through a process of elimination I discovered some code that was causing the undesired behavior. (see notation in code) Now the firing loop in the Run case is the problem.  This loop must be called any number of times from the Event structure until the application is completed.  Where would be the best location for this loop?

0 Kudos
Message 6 of 13
(3,570 Views)

let me try adding it again ...

0 Kudos
Message 7 of 13
(3,564 Views)

@faustina wrote:

This loop must be called any number of times from the Event structure until the application is completed.  Where would be the best location for this loop?


Is this still about the menu bar? Or is that solved?

0 Kudos
Message 8 of 13
(3,542 Views)

yes, it's still about the custom menu bar.

The existence of the loop affects the menu bar.

0 Kudos
Message 9 of 13
(3,521 Views)

it's the timed loop that is causing the problem

0 Kudos
Message 10 of 13
(3,508 Views)