KeyPreview = TRUE | FALSE
Description
KeyPreview is a global property that enables the Output object to receive all keystroke events. KeyPreview is FALSE by default, which prevents the Output object from receiving any keystroke events. Setting KeyPreview to TRUE allows the Output to receive all keystroke events, regardless of which object is activated to receive keyboard input.
Example
REM KeyPreview Example
'KeyPreviewenableskeystrokeeventsinOutput
KeyPreview = TRUE
AddObject "TextBox","Text",50,50,90,90
SUB Output_KeyPress(key)
PRINT "Key Pressed: ", key
END SUB
Output
Related Items
KeyDown, KeyPress, KeyUp, PictureBox, SetFocus, Output