Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-02-05
4
Medium Priority
?
3,228 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

604 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