Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am designing an application in VB.Net which would run on the tablet PC.
I need a virtual keyboard in my application which can activated on the click of a button or some shortcut.

Can anybody tell how can I make use the windows virtual keyboard? How to show/hide the keyboard?

any help would be much appreciated.

Regards
Nitin
Posted

I recently answered related Question; there is one important issue discussed here: Application focus getting and losing[^].

—SA
 
Share this answer
 
I have just tried the following and it works fine;

VB
Public Class Form1
    Private OSK As System.Diagnostics.Process
Private Sub ButtonShowOSK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonShowOSK.Click
        'Create the OSK Process
    OSK = System.Diagnostics.Process.Start("osk.exe")
End Sub

Private Sub ButtonKillOSK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonKillOSK.Click
    Try
        OSK.Kill()
    Catch ex As Exception
        Debug.WriteLine(ex.Message)
    End Try
End Sub
End Class


Note1: the OSK process has a CloseMainWindow() method, however, it returns true, indicating success, but the OSK remains running.

Note2: the OSK process has a Close() method, but nothing hapens.

So, the KILL method works!
 
Share this answer
 
Comments
DaveAuld 20-Feb-11 13:52pm    
OSK = Windows OnScreen Keyboard app which is part of Windows.
karel-zavadil 7-Aug-13 12:23pm    
This works fine on some machines, but it doesn't on others - on some computers killing the process won't actually end the On-Screen-Keyboard for reasons unknown. If anyone knows what is causing this, help would be much appreciated.
If you are talking about the Virtual Keyboard COM component, then this[^] has some info.
 
Share this answer
 
Comments
Espen Harlinn 20-Feb-11 9:36am    
Nice to know, my 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900