Triggering the On Screen Keyboard lazarus / 34-Windows ---------------------------------------------------------------------- geraldholdsworth · 2025-02-01 11:30 I'm developing an application to be used on a Windows 11 tablet. This application has TEdit components for data entry, but when I tap on one the Windows On Screen Keyboard doesn't pop up. Is there a way of activating it? This is Lazarus 2.2.6 on Windows 10 (but developing for 11) 64 bit. FPC is the standard install that came with it (not sure on the version). ---------------------------------------------------------------------- PascalDragon · 2025-02-02 21:02 The following works for me in a quick test on a Windows 10 in tablet mode (found here): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    Edit1: TEdit;    procedure Edit1Enter(Sender: TObject);  private   public   end; var  Form1: TForm1; implementation uses  Windows; {$R *.lfm} function FindTrayButtonWindow: THandle;var  ShellTrayWnd: THandle;  TrayNotifyWnd: THandle;begin  Result := 0;  ShellTrayWnd := FindWindow('Shell_TrayWnd', nil);  if ShellTrayWnd > 0 then  begin    TrayNotifyWnd := FindWindowEx(ShellTrayWnd, 0, 'TrayNotifyWnd', nil);    if TrayNotifyWnd > 0 then    begin      Result := FindWindowEx(TrayNotifyWnd, 0, 'TIPBand', nil);    end;  end;end;  { TForm1 } procedure TForm1.Edit1Enter(Sender: TObject);var  TrayButtonWindow: THandle;begin  TrayButtonWindow := FindTrayButtonWindow;  if TrayButtonWindow > 0 then  begin    PostMessage(TrayButtonWindow, WM_LBUTTONDOWN, MK_LBUTTON, $00010001);    PostMessage(TrayButtonWindow, WM_LBUTTONUP, 0, $00010001);  end else begin    ShellExecute(0, 'open', 'c:\Program Files\Common Files\microsoft shared\ink\TabTip.exe', nil, nil, SW_SHOWNA);  end;end; end. Note: I added the button with TabOrder set to 0 so that the edit control wouldn't start selected. ---------------------------------------------------------------------- geraldholdsworth · 2025-02-03 13:25 Works perfectly. Thank you.