Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.
IMEStatus()
This pair is for writing applications that deal with Double-Byte Character Sets
, in particular Japanese and Korean language applications. They let you indicate how a special tool called an Input Method Editor behaves when you enter a field or open a Browse or other editing window.
oObject.IMEMode = 0 | 1
nIMEMode = oObject.IMEMode
nIMEStatus = IMEStatus( [ 0 | 1 ] )
IMEMode is a property of several controls that accept text. IMEStatus()
is a function that both tells you what’s going on and lets you change it. They’re both ignored unless you’re running a Far Eastern version of Windows.
In Far Eastern languages, it takes two bytes to represent each character because they’re based on pictographs rather than sounds. Entering these two-byte characters is a challenge—you certainly don’t want a keyboard with 65,000 items on it. The solution is a special application that lets you choose the appropriate pictograph; such an application is called an Input Method Editor (IME).
IMEMode indicates what should happen with the IME when the control gets focus. You can set it to open the IME, close the IME or simply do whatever the operating system is set for. IMEStatus()
does two jobs—it lets you turn the IME window on and off, and it tells you the current IME setting.
It seemed a little extreme to install a Far Eastern version of Windows just to test this stuff, so all we’ve done is make sure they don’t crash in the U.S. version of Windows.
This.IMEMode = 1 && Have IME Window open