keypress Event 에 아래와 같이 해주시면...
<!--CodeS-->
if (Key >= 'a') and (Key <= 'z') then
Key := Chr(Ord(Key) - 32)
else if (not ((Key >= 'A') and (Key <= 'Z'))) and (Key <> char(VK_BACK))
and (Key <> char(VK_DELETE)) then
Key := #0;
<!--CodeE-->
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key < #164 then
begin
if not (key in [#8,#13]) then
begin
key := #0;
end;
end;
end;
procedure TForm1.Edit1Enter(Sender: TObject);
begin
SetHangulMode;
end;
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 229 then
begin
SetHangulMode;
end;
end;
procedure TForm1.SetHangulMode;
var
tMode : HIMC;
begin
tMode := ImmGetContext(self.Handle);
ImmSetConversionStatus(tMode, IME_CMODE_HANGEUL,IME_CMODE_HANGEUL);
end;
keypress Event 에 아래와 같이 해주시면...
<!--CodeS-->
if (Key >= 'a') and (Key <= 'z') then
Key := Chr(Ord(Key) - 32)
else if (not ((Key >= 'A') and (Key <= 'Z'))) and (Key <> char(VK_BACK))
and (Key <> char(VK_DELETE)) then
Key := #0;
<!--CodeE-->