![]() |
Touch-It Virtual Keyboard | Version 4.9.2 |
| Windows messages |
|
This topic demonstrates how to drive Touch-It using simple Windows messages. Show/hide keyboardDelphi example of how to show or hide the keyboard with the message WM_TOUCHITSHOWHIDE.
Interface
var
//Variable for unique Windows message ID implementation procedure ShowKeyboard(aShow :boolean; aLayout :integer); begin SendMessage(FindWindow(nil, PChar('Touch-It Keyboard')),
WM_TOUCHITSHOWHIDE, //Retreive the unique Windows message ID initialization WM_TOUCHITSHOWHIDE := RegisterWindowMessage('WM_TOUCHITSHOWHIDE'); Keyboard positionDelphi example of how to select the keyboard position (appbar, floating, corners, etc.) with the message WM_TOUCHITPOSITION.
Interface
var
//Variable for unique Windows message ID implementation procedure SelectPositionType(aPos :integer; aLayout :integer); begin SendMessage(FindWindow(nil, PChar('Touch-It Keyboard')),
WM_TOUCHITPOSITION, //Retreive the unique Windows message ID initialization WM_TOUCHITPOSITION := RegisterWindowMessage('WM_TOUCHITPOSITION'); Floating keyboard positionDelphi example of how to a set keyboard position using either WM_TOUCHITSETPOS or WM_TOUCHITSETBOUNDPOS messages.1. WM_TOUCHITSETPOSset absolute keyboard position.
Interface
var
//Variable for unique Windows message ID implementation procedure SetPosition(x, y :integer; aWorkArea :boolean); begin SendMessage(FindWindow(nil, PChar('Touch-It Keyboard')),
WM_TOUCHITSETPOS, //Retreive the unique Windows message ID initialization WM_TOUCHITSETPOS := RegisterWindowMessage('WM_TOUCHITSETPOS'); 2. WM_TOUCHITSETBOUNDPOSSet keyboard position above or beneath an edit control without hidding it.
Interface
var
//Variable for unique Windows message ID implementation //OnEnter edit control event procedure TForm1.Edit1Enter(Sender: TObject); begin
//ClientToScreen retreives screen coordinates of the control SendMessage(FindWindow(nil, PChar('Touch-It Keyboard')),
WM_TOUCHITSETBOUNDPOS, //Retreive the unique Windows message ID initialization WM_TOUCHITSETBOUNDPOS := RegisterWindowMessage('WM_TOUCHITSETBOUNDPOS'); |
| Copyright © 2011 Chessware SA |