User Tools

Site Tools


on_20screen_20keyboard

On Screen Keyboard

by Richard Russell, September 2013

To open the Windows On Screen Keyboard from an LBB program use this code:

  files "c:\windows\sysnative\", "cmd.exe", info$()
  if val(info$(0,0)) then
    run "c:\windows\sysnative\cmd.exe /c osk.exe", hide
  else
    run "cmd.exe /c osk.exe", hide
  end if

The reason for this complexity is that the 32-bit version of OSK.EXE supplied with 64-bit Windows 7 does not run (this issue appears to have been fixed in Windows 8). Therefore it is necessary to force the 64-bit version to be run, which is the purpose of the above code.

If you want the code also to be compatible with Liberty BASIC 4.04, DIMension the array at the start:

  dim info$(0,0)
  files "c:\windows\sysnative\", "cmd.exe", info$()
  if val(info$(0,0)) then
    run "c:\windows\sysnative\cmd.exe /c osk.exe", hide
  else
    run "cmd.exe /c osk.exe", hide
  end if
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
on_20screen_20keyboard.txt · Last modified: 2024/01/05 00:21 by 127.0.0.1