在Windows 8和Windows 10周年更新之前,可以通过启动...来显示触摸键盘。
C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe
在Windows 10周年更新版本中不再起作用;TabTip.exe进程正在运行,但键盘未显示。
有没有办法通过编程的方式将其显示出来?
更新
我找到了一个解决方法 - 在系统托盘中对触摸键盘图标进行虚拟鼠标点击。以下是Delphi代码:
// Find tray icon window
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;
// Post mouse click messages to it
TrayButtonWindow := FindTrayButtonWindow;
if TrayButtonWindow > 0 then
begin
PostMessage(TrayButtonWindow, WM_LBUTTONDOWN, MK_LBUTTON, $00010001);
PostMessage(TrayButtonWindow, WM_LBUTTONUP, 0, $00010001);
end;
更新2
我发现的另一件事情是,设置此注册表键可以在启动TabTip.exe时显示触摸键盘,恢复旧功能。
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TabletTip\1.7\EnableDesktopModeAutoInvoke=1