VirtualKey Attribute
Data Type: integer
4GL Access: RW
This attribute contains the virtual key code for the key. Note that the code distinguishes between the left and right Shift, Control, and Alt keys. The virtual key for these keys is as follows:
All virtual key values are defined in
Virtual Key Values.
You can intercept a key down message and prevent further processing of the WM_KEYDOWN or WM_SYSKEYDOWN message by setting the VirtualKey attribute to zero in the KeyDown or ChildKeyDown event block, as in the following example:
/* the virtual key code for the A key is 65. */
on ChildKeyDown =
declare
KeyData = KeyDownData default NULL;
VirtualKey = integer not null;
begin
KeyData = KeyDownData(CurFrame.MessageObject );
VirtualKey = KeyData.VirtualKey;
/* Do no further processing of the A key */
if (VirtualKey = 65) then
KeyData.VirtualKey = 0;
endif;
end
Last modified date: 12/20/2023