Solved

How do I deactivate the Tabtip on-screen keyboard for a tablet computer using VB.Net 2010

Posted on 2013-02-05
4
3,088 Views
Last Modified: 2013-02-17
Hi,

I have previously been programming in Microsoft Visual Studio 2005 and now am migrating some applications to Visual Studio 2010.

One of my applications will be modified to be used on a Windows 8 Pro Slate computer.

One obvious change is that my program will have to use the on-screen keyboard known as tabtip.exe.

I have tried to activate the tabtip executable when opening the application, which seems to work okay, but deactivating it is another matter.

So now I have some questions:

1.       Are functions like tabtip part of an SDK? Is there one available for VS2010?

2.       If not:

·         Is there a standard way to configure the use of tabtip (ie. Open when an input field has focus, Close when a checkbox has focus)?

·         Can something like this be used when a 'hard' keyboard base/dock is attached, automatically preventing tabtip from being shown?

Any insight would be appreciated.
0
Comment
Question by:Pirie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38858971
0
 

Author Comment

by:Pirie
ID: 38876685
I have tried this approach. Using the TextInputPanel works well on Windows 7, but unfortunately an ‘Error HRESULT E-FAIL has been returned from a call to a COM component’ error message appears in Windows 8 and the keyboard doesn’t pop-up at all.

I am specifically looking for a solution for Windows 8, so this is not the solution. Do you have any other suggestions?
 
Could there be standard features in VB2012 to solve this (I am currently using VB2010)?

 

 have tried this approach. Using the TextInputPanel works well on Windows 7, but unfortunately an ‘Error HRESULT E-FAIL has been returned from a call to a COM component’ error message appears in Windows 8 and the keyboard doesn’t pop-up at all. We are specifically working on a solution for Windows 8, so this is not the solution. Do you have any other suggestions?
Could there be standard features in VB2012 to solve this (we are currently using VB2010)?
0
 

Accepted Solution

by:
Pirie earned 0 total points
ID: 38883644
I found the following solution through a separate channel, namely MSDN. The problem was the Elevated Process.
 
Here is an example in VB.NET 2010

Imports System.Threading
Imports System.Runtime.InteropServices
 

Public Class Form2
    Dim WM_SYSCOMMAND As Int32 = 274
    Dim SC_CLOSE As UInt32 = 61536
    <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
    Private Shared Function PostMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Boolean
    End Function
 

    <DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
    Private Shared Function FindWindow( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As IntPtr
    End Function

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Process.Start("C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe")
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim TouchhWnd As New IntPtr(0)
        Dim hWnd As New IntPtr(0)
        TouchhWnd = FindWindow("IPTip_Main_Window", Nothing)
        'If ..

        'Else..

        PostMessage(TouchhWnd, WM_SYSCOMMAND, SC_CLOSE, 0)
    End Sub
End Class
0
 

Author Closing Comment

by:Pirie
ID: 38898338
I found this solution independently via MSDN.

It's a pity that no MSDN'ers seem to be looking at this EE forum. I seem to recall that in past years this used to be the case.

Maybe I'm missing a way of involving MSDN'ers in EE. Please advise if this is the case.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question