I'm not sure about this particular barcodereader that you are using, but if it does generate keystrokes just like a keyboard, this would be a perfect way to programmatically interact with your textbox in CVI. For instance, if you set up a callback like the following, you can wait for a key to be pressed when the textbox is selected and check to see if it is the enter key:
int CVICALLBACK TextBoxCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event) {
case EVENT_KEYPRESS:
if (eventData1 == VAL_ENTER_VKEY) {
// Do textbox manipulation here
}
break;
}
return 0;
}
Check out the description of the EVENT_KEYPRES
S event and the constants defined in the user interface library for the various different key codes within the LabWindows/CVI Online help.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask