タイトル : Re^7: タッチキーボードの呼び出し 投稿日 : 2018/03/09(Fri) 01:43 投稿者 : jikoryuu
以下のコードで起動と閉じることができることを確認しました ■TabTip起動時 Process.Start("c:\program files\common files\microsoft shared\ink\tabtip.exe") ■TabTipを閉じる時 '宣言 Const WM_SYSCOMMAND As Integer = &H112 Const SC_CLOSE As Integer = &HF060 Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As IntPtr) As IntPtr '閉じたいイベントで Dim hWnd As IntPtr = FindWindow("IPTip_Main_Window", vbNullString) If hWnd <> IntPtr.Zero Then PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0) |