LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard not working on front panel

Super, thanks.
 
We are using LabVIEW 8.2.  As this is not the current version (as of this week), would you still offer a fix for 8.2, or would this be for 8.5?
 
I'll now work on the assumption that the issue will be fixed, and await the fix.
0 Kudos
Message 11 of 21
(1,804 Views)
Fixed.
 
 
George Zou
http://gtoolbox.yeah.net

Message Edited by zou on 08-10-2007 09:43 AM

George Zou
Message 12 of 21
(1,798 Views)
Thank you very much.  That is a brilliant workaround.
 
Are there any licencing issues with the two VI's you've enclosed?  Will they start popping up reminders or anything similar?
0 Kudos
Message 13 of 21
(1,778 Views)
Zou - I can't get my project to build after I've included your VI.  The "Find Window" VI caused the app builder to have a problem with not being able to remove unreferenced polymorphic instances.  After I deselected the option to remove these it will build, although the built file size almost doubles.
 
However, your VI within my built application now just returns error code 0 when I run it, with no additional explanation.
 
I think the problem is that you've removed everything from the VI - even its front panel, I think.  Could you not just let me know what API calls you're making?  I'm guessing you're calling user32.dll.  I've done things with this before, I can work out how to do it, but it would be very much appreciated if you could let me know what call(s) you've made to do this.
 
Thanks
-Sean.
0 Kudos
Message 14 of 21
(1,768 Views)
I should correct my error in my previous post.  The VI isn't returning error 0, TestStand is.  TestStand says that the code is not executable.  The VI (within a DLL) is not being executed at all.
 
I can exclude Zou's VI's and it builds and runs no problem.  So it appears that they won't build into a DLL.
0 Kudos
Message 15 of 21
(1,763 Views)
It seems like Zou will have to take over this one.  The block diagrams of the code is locked.  My guess is that the toolkit might be calling some dlls that you'll have to include in your project build.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 16 of 21
(1,747 Views)

Sean,

Seems we are working in difference time zone 😉

Since this VI is for you, so there is no license issue here.  Feel free to use it wherever you want.

Application Build is not user firendly.  It should just skip the VIs it can't open instead of fail.

As a work around, you can call the VIs dynamically.  Or create a seperate dll just for these 2 VIs.

So that you don't have to deselected the option to remove unreferenced polymorphic instances.

 

Please write to me in private (gtoolbox@hotmail.com) for the popup reminder issue, and

the TestStand issue.

 

George Zou

http://gtoolbox.yeah.net

 

 

George Zou
0 Kudos
Message 17 of 21
(1,738 Views)

I can't use VI's that don't have a diagram.  This application will be used within a secure environment, so I need to be able to analyse the code.  There are also many other reasons to not use them, e.g. problems when upgrading LabVIEW, etc, etc.  Besides which, it's hardly the community spirit - this forum is intended for shared help, not promotion of proprietary locked code.

Instead of using Zou's VI's, I'm making the following calls from User32.dll

  • FindWindowA - To obtain the window reference number
  • SetFocus - To set the keyboard focus to the window

It works a treat.  Just one oddity though - the FindWindowA function takes in two strings - Class Name and Window Name.  I believe I need to input an empty string as the Class Name.  If I set it to empty string then the call always returns 0.  I had to (incorrectly) set it to be an I32 set to zero to make it work.  I guess this is due to the way that strings are represented as a pointer.

Let me know if I've done anything dodgy here, but it seems like a fix to me.  VI attached.

0 Kudos
Message 18 of 21
(1,719 Views)
The intended was to help you, not for promotion.  As I said: "no license issue here".
George Zou
0 Kudos
Message 19 of 21
(1,710 Views)
It did help, after I'd opened your VI in Notepad and worked out the DLL calls within it!  It looks like you may possibly be calling Kernel32.dll though - it's not easy to work out.  But I did find the SetFocus function in there.
 
Seriously, thanks for your help though.  This has got me running again.
0 Kudos
Message 20 of 21
(1,704 Views)