procedure CloseEDTIME(edt: TEdit);
var
KeyStates: TKeyboardState;
begin
GetKeyboardState(KeyStates);
if (KeyStates[VK_CAPITAL] = 1) then
begin
SetCapsLockKey(VK_CAPITAL, TRUE); //关大写
end;
Closeime(edt.Handle);
end;
procedure OpenEDTIME(edt: TEdit);
var
KeyStates: TKeyboardState;
begin
GetKeyboardState(KeyStates);
if (KeyStates[VK_CAPITAL] = 1) then
begin
SetCapsLockKey(VK_CAPITAL, TRUE); //关大写
end;
edt.ImeMode := imChinese;
edt.ImeName := ShareGlobalVar.GlobalVar.GetImeName;
edt.ImeMode := imOpen;
end;
procedure GetDicIME(edt: TEdit);
var
KeyStates: TKeyboardState;
begin
GetKeyboardState(KeyStates);
if (KeyStates[VK_CAPITAL] = 0) then
begin
SetCapsLockKey(VK_CAPITAL, TRUE); //开大写
end;
Closeime(edt.Handle); //关输入法
end;
procedure OpenCMBIME(cmb:TComboBox);
var
KeyStates: TKeyboardState;
begin
GetKeyboardState(KeyStates);
if (KeyStates[VK_CAPITAL] = 1) then
begin
SetCapsLockKey(VK_CAPITAL, TRUE); //关大写
end;
cmb.ImeMode := imChinese;
cmb.ImeName := ShareGlobalVar.GlobalVar.GetImeName;
cmb.ImeMode := imOpen;
end;
procedure CloseCapital;
var
KeyStates: TKeyboardState;
begin
GetKeyboardState(KeyStates);
if (KeyStates[VK_CAPITAL] = 1) then
begin
SetCapsLockKey(VK_CAPITAL, TRUE); //关大写
end;
end;