아래의 예제를 참고하세요..
다른 방법이 있는 지는 모르겠습니다..
구태여 키보드 메세지를 날리실 필요까진 없을 거 같습니다..
From 류..
---------
Procedure AddWordInStrings(St:TStrings; Word:String);
Var
iLine : Integer;
stTemp : String;
Begin
iLine:= St.Count-1;
If iLine > 0 then
Begin
stTemp:= St.Strings[iLine];
stTemp:= stTemp + Word;
St.Strings[iLine]:= stTemp;
End
Else St.Add(Word);
End;
procedure TForm1.Button1Click(Sender: TObject);
begin
AddWordInStrings(Memo1.Lines, 'a');
end;
|