|
-
Oct 30th, 2010, 11:33 AM
#1
Thread Starter
Member
Show/Hide On Screen Keyboard (OSK, Touchscreen)
I want to show and hide the OSK keyboard (docked at the bottom) for my touch screen application best methods? (I want to make sure when I show that I try to run, in case someone closed it while using the app)
-
Oct 30th, 2010, 12:29 PM
#2
Addicted Member
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
make a button or menu strip as u wish and call it what u wish
and use this code
Code:
Shell("cmd.exe /c start osk")
Works like charm
-
Oct 30th, 2010, 02:15 PM
#3
Thread Starter
Member
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
What about hiding the OSK?
-
Oct 30th, 2010, 09:30 PM
#4
Addicted Member
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
The user will close it or minimize it
-
Oct 30th, 2010, 10:12 PM
#5
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
Simplest.
Use process to get the id of the osk and close it.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Oct 31st, 2010, 12:21 AM
#6
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
As always, you should use Process.Start in preference to Shell. We're using VB.NET now so let's use VB.NET.
vb.net Code:
Public Class Form1 Private oskProcess As Process Private Sub openButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles openButton.Click If Me.oskProcess Is Nothing OrElse Me.oskProcess.HasExited Then If Me.oskProcess IsNot Nothing AndAlso Me.oskProcess.HasExited Then Me.oskProcess.Close() End If Me.oskProcess = Process.Start("osk") End If End Sub Private Sub closeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles closeButton.Click If Me.oskProcess IsNot Nothing Then If Not Me.oskProcess.HasExited Then 'CloseMainWindow would generally be preferred but the OSK doesn't respond. Me.oskProcess.Kill() End If Me.oskProcess.Close() Me.oskProcess = Nothing End If End Sub End Class
Last edited by jmcilhinney; Oct 31st, 2010 at 12:27 AM.
-
Nov 1st, 2010, 06:10 PM
#7
Thread Starter
Member
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
Mine Opens, but does not close. I don't actually need to close it, I could minimize it or something too. I also realize now that the OSK isn't the same keyboard used in the Tablet PC input panel. The one in the Tablet PC input panel is better :-/
-
Jan 6th, 2016, 04:14 AM
#8
New Member
Re: Show/Hide On Screen Keyboard (OSK, Touchscreen)
the tablet OSK is:
Me.oskProcess = Process.Start("C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|