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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

8 Experts available now in Live!

Get 1:1 Help Now