LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Keystroke from CVI to protection software

Hi

I use PC Guard for .NET to protect my CVI application. There is a panel with information the

user needs if transfering to another computer. This panel might be invoked by the key combination

CTRL+SHIFT. As CVI reacts on keyboard event how can I pass this along to PC Guard ?

 

I have a panel callback that process the EVENT_KEYPRESS and if the F12 key is pressed

it issues a FakeKeystroke(VAL_SHIFT_MODIFIER | VAL_MENUKEY_MODIFIER);

It does not work.

0 Kudos
Message 1 of 4
(3,053 Views)

You could try using Win32 API command SendMessage or PostMessage with message = WM_KEYDOWN and wparam = VK_SHIFT | VK_CONTROL.

I haven't tried myself, but I suppose that FakeKeystroke cannot be used to send modifier keys only.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,050 Views)

Where do I find that library ?

Can I use a function from shell32.lib ?

Thank you so far...

0 Kudos
Message 3 of 4
(3,045 Views)

Interface to the Windows 32 API (formerly Windows SDK) is an optional component of CVI. It is not installed by default: you must run custom install to select this option. After that, you have all libraries and files to have access to standard Windows functions and resources, with several examples of what you can do with that. Here a list of functions from those libraries included in the various CVI packages. PostMessage and SendMessage are very basic Windows commands and are included both in Base and Full version of CVI so you should have no problems in using them regardless the version of CVI you are using. Here a small document on how to use them.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(3,040 Views)