12-27-2012 09:44 AM
I don't see how to make the disable keyboard function work for me.
Discarding keyboard events does not gain me anything.
LabVIEW no longer responds to the ALT key as a KEY-DOWN? event, so I cannot hide the ALT key from LabVIEW.
Disabling the keyboard altogether, using the Windows API, also doesn't help me.
I do not know when the user is going to click on one of these controls, so I do not know when to enable or disable the keyboard.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-27-2012 09:46 AM
That is odd
Yeah, that's pretty much the conclusion that I came to... 😉
Tech Support says that it's just the way Windows is nowadays, and I have to find some other way to do what I want.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-28-2012 08:23 AM
In this case the solution that I can see... is to disable the alt key in some way, or try to press and hold the ALT key using windows features or changing the way how the event is handled.
12-28-2012 09:20 AM
Tech Support passed on an idea - use the Sticky Keys feature.
It does sort of work - with Sticky Keys ON, you press ALT and RELEASE it, then click the selector.
My code then thinks it's an alt-click and responds appropriately.
But, the press-and-release is not REQUIRED for SHIFT or CTRL, so it makes an oddball UI.
Not to mention the fact that Alt-Shift turns Sticky Keys OFF. Given that we're messing about with those keys, that's an unacceptable behavior.
So, basically, Microsoft has pulled the rug out from under me, for no good reason.
So, my client has had to accept a reduced functionality (only four combinations, instead of six). And I ended up promising something that I can't deliver.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-28-2012 09:34 AM
Six keyboard combinations.........six functions on a single control...............I really hate to open a can of worms and I'm not close to the project but (dispite my distate for menus) a custom control with a *.mnu might get the job done if you can right click rather than keyboard the solution
12-28-2012 03:07 PM
I've done custom menus, by building them at click time. Specifically, I'm modifying the existing run-time (right-click) menu.
I don't see how to use that feature to advantage here.
I have 200-300 channels. The point is to offer the list of channels in alphabetical order, or in order of units (all the degC together, and all the kPa together, etc..) or in order of device (all the SCXI together, and all the DI together...), at the whim of the user in the moment.
If I understand you correctly, you are referring to a string control (to display the current selection). I would intercept the Mouse Down? event for a right-click, and modify the pop-up menu depending on whether ALT or CTL or ALT+SHIFT was in force at the time.
Presumably, Windows doesn't interfere with ALT in such a case. (Presumably ,,, beware...).
That could work, but it means operating the thing with a RIGHT click, when they have been doing it with the LEFT click for years. And everything else operates with a left click.
Am I understanding you correctly?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
12-28-2012 04:49 PM
12-28-2012 05:01 PM
There used to be (maybe still is) a contest for the most obfuscated C code you could invent.
Is there a most-obfuscated-LabVIEW-code contest you're going for ?
😉
Have you done such a thing before?
How was the performance?
I cannot use .mnu files: the contents must be dynamic (they might add a channel or delete a channel).
I can pre-build the lists in the different orders I want, though (that's what I'm doing now).
Would such a thing be sluggish? I don't want the user to click and wait before the menu appears.
Blog for (mostly LabVIEW) programmers: Tips And Tricks