Hi Monky!
I think there's no way to hide console, I mean, in GetKey docs, you'll find:
Note GetKey detects keystrokes
only in the Standard I/O window. GetKey does not
detect keystrokes in windows
you create with the User Interface Library or in
the console window of a Windows Console Application.
To intercept keystroke in your panel, for example, I suggest you to use EVENT_KEYPRESS (value = 7). For example, in your main panel callback, you can write:
int CVICALLBACK PanelCallback (int panel, int event, void *callbackData,
int eventData1, int eventData2)
{
switch (event)
{
case EVENT_CLOSE:
QuitUserInterface(0);
return 0;
break;
case EVENT_KEYPRESS:
YourFunction( ... );
return 0;
break;
}
return 0;
}If you look at EVENT_KEYPRESS definition, you find also this:
#define EVENT_KEYPRESS 7 /* eventData1 = keypressed, */
/* eventData2 = pointer to keypressed */
so you get also the value of key actually pressed.
Of course, this is valid if you have a panel, in your application.
Hope it helps, please let me know!
graziano