Solved

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

Posted on 2013-02-05
4
2,923 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
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now