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,945 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

15 Experts available now in Live!

Get 1:1 Help Now