代码说明:
TKeyboard displays an alphanumeric or numeric keyboard on the screen. TKeyboard is derived from TPanel. Shift and Caps lock: The behavior of the shift key is slightly different than on real keyboards. Pressing shift once puts TKeyboard in shift mode and TKeyboard displays the second function of the keys. After pressing one key TKeyboard falls back in normal mode. Caps lock works just as it does in a real keyboard. The CharCase property controls the case of the returned characters. On ecUpper all characters are converted to uppercase, on ecLower all characters are converted to lowercase, on ecNormal characters are in lowercase when not in shift or caps mode. If in shift or caps mode all characters are in uppercase. Through the LinkedControl property TKeyboard can be linked to any descendant of TWinControl. By linking a control to TKeyboard, keys pressed on TKeyboard are passed to the linked control. This is especially usefull for TEdit, TMemo, TRichtText and TComboBox (and the corresponding ...DB.. controls). TWinControl is used as LinkedControl class because its the first common anchestor for all the controls above. The keyboard layout of TKeyboard reflects a standard US keyboard. The layout can be changed by changing the ANLRow constants below.
【立即下载】
|