Author: Tomas Rutkauskas
Using a TDBEdit, I would like to achieve something like this on user input:
S ... (wait a few milliseconds) ... O ... (wait) ... M ... (wait) ... E
Answer:
1 procedure SendtextToControl(control: TWinControl; const S: string;
2 interval: Integer {milliseconds});
3 var4 i: Integer;
5 begin6 for i := 1 to Length(S) do7 begin8 control.perform(WM_CHAR, Ord(S[i]), 0);
9 control.Update;
10 if i < Length(S) then11 Sleep(interval);
12 end;
13 end;