Back

Topic

[KB1159]Open the Windows virtual keyboard

Tags: Animations, Keyboard

2 years ago
By HOTE
Options
Print
Applies to:

PcVue 12 onwards


Summary:

PcVue comes with its own virtual keyboard, but you cannot enlarge this one.
To have bigger virtual keys, you can use the Windows On-Screen Keyboard. We will explain how to do that in this article.


Details:

In the following image, we can see that we can open the Windows virtual keyboard by clicking on the green button of the red framed test mimic. This test mimic can be downloaded at the end of this article.

osk sample

If you want to open this keyboard with another object (ie the yellow framed icon on the previous image), you need to follow these steps.

1- Open your mimic in design mode, right click on your graphical object and select “View script”:

osk view script

2- Paste the following script:

On Error Resume Next
Wow64EnableWow64FsRedirection False
ShellExecute 0, “open”, “osk.exe”, “”, “”, vbNormalFocus
Wow64EnableWow64FsRedirection True

3- Paste also the following declarations on top of the VBA project:

Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal LpszDir As String, ByVal FsShowCmd As Long) As Long
Private Declare Function Wow64EnableWow64FsRedirection Lib “kernel32.dll” (ByVal Enable As Boolean) As Boolean

It should look like that:

osk VBA

Note that the selected text depend on your graphical object.

4- Save and close your mimic. That’s all.

Note that you can also use the On-Screen Keyboard on a “normal” computer which has a physical keyboard, but you need to select this option:

osk options

Caution: The Windows Keyboard is not compatible with WebVue.

Sample mimic:

Download attachments: The mimic


Created on: 24 Aug 2022 Last update: 30 May 2024