function TFrm_main.InputChar(str: string): Boolean;
var
i : integer;
c : byte;
begin
for i := 1 to Length(str) do
begin
c := VkKeyScan(str[i]) and 255; //输入文字
keybd_event(c,0,0,0);
keybd_event(c,0,KEYEVENTF_KEYUP,0);
end;
end;
Last modification:January 23rd, 2011 at 01:25 pm
© 允许规范转载