How to switch the Chinese and English input method and full anglehalf? (Original)

xiaoxiao2021-03-06  38

How to switch the Chinese and English input method and full angle / half?

Problem Description:

How to switch Chinese English input method and full angle / half angle, Chinese and English characters, etc.

solution:

First, state the external function:

Function Boolean Immsimulatehotkey (unsignedlong hwnd, unsignedlong dwhotkeyid) library "imm32.dll"

Function unsignedlong getKeyboardLayout (unsignedLong WLayout) library "user32.dll"

Function Boolean Immisime (unsignedLong HKLKeyboardLayout) library "imm32.dll"

Second, write in a button:

Long ll_hwnd

LL_HWND = Handle (SLE_1)

IF not immisime (getKeyboardLayout (0))

Immsimulatehotkey (LL_HWND, 16)

END IF

Immsimulatehotkey (LL_HWND, 17)

Third, test: After running, enter the comma first in Text, all of which are half angle, then click the button, then enter the comma, all of the whole corner

转载请注明原文地址:https://www.9cbs.com/read-65022.html

New Post(0)