.net – 在桌面下打开和关闭Windows 8触摸键盘tabtip

前端之家收集整理的这篇文章主要介绍了.net – 在桌面下打开和关闭Windows 8触摸键盘tabtip前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要从 Windows 8(桌面winform .NET)下的程序中关闭tabtip键盘.
我发现需要时打开它,运行TabTip.exe来显示Windows 8 Touch键盘,但我无法在需要时关闭它!
我试图用process.kill来杀死这个过程,但是它没有用,有人知道怎么做了吗?

问候
让 – 克洛德·

尝试以下 – 使用TabTip替换Osk

公共类Form1

Private oskProcess As Process

Private Sub openButton_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles openButton.Click
    If Me.oskProcess Is Nothing OrElse Me.oskProcess.HasExited Then
        If Me.oskProcess IsNot Nothing AndAlso Me.oskProcess.HasExited Then
            Me.oskProcess.Close()
        End If

        Me.oskProcess = Process.Start("osk")
    End If
End Sub

Private Sub closeButton_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles closeButton.Click
    If Me.oskProcess IsNot Nothing Then
        If Not Me.oskProcess.HasExited Then
            'CloseMainWindow would generally be preferred but the OSK doesn't respond.
            Me.oskProcess.Kill()
        End If

        Me.oskProcess.Close()
        Me.oskProcess = Nothing
    End If
End Sub

结束班

原文链接:https://www.f2er.com/windows/441235.html

猜你在找的Windows相关文章