Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Declare Function ImmGetContext Lib "imm32.dll" (ByVal hwnd As Long) As Long
- Public Declare Function ImmReleaseContext Lib "imm32.dll" (ByVal hwnd As Long, _
- ByVal himc As Long) As Long
- Public Declare Function ImmSetOpenStatus Lib "imm32.dll" (ByVal himc As Long, _
- ByVal b As Long) As Long
- Sub IMEControl2()
- Dim hImc As Long
- Dim myHWnd As Long
- Dim Ret As String
- 'Check Version
- If Application.Version > 9 Then
- myHWnd = Application.hWnd
- Else
- myHWnd = FindWindow("XLMAIN", 0)
- End If
- hImc = ImmGetContext(myHWnd)
- 'IME OFF
- If hImc <> 0 Then
- Call ImmSetOpenStatus(hImc, 0)
- Call ImmReleaseContext(myHWnd, hImc)
- End If
- Ret = Application.InputBox("Type.", Type:=2)
- If Ret <> "" Then
- MsgBox "IME-OFF with API :" & Ret
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement