key press simulate ...

how can i simulate key press ?

for example right key ?

10x
Asi
asiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
raidosConnect With a Mentor Commented:
SendMessage(Handle, WM_KEYDOWN, VK_RIGHT, 0);
should do that..
0
 
PLCCommented:
If that doesn't solve your problem, check out the "keybd_event" API in your win32 help file.
0
 
craig_capelCommented:

Place this in your timer :)

var
 tmp2: string;
 n: integer;
begin
tmp2:='If you Try this out, you will see that this message appears';
  for n:=1 to length(tmp2) do
     begin
      keybd_Event(ord(upcase(tmp2[n])), 0, 0, 0);{key down}
     end;
end;

Craig C.
0
 
craig_capelCommented:
if you want to see an app i made (full source code provided) very simple but i love it....

http://members.xoom.com/craig_c/ghost.zip  <<Sims key pressess like you asked, the source code shows you how i did it...

Hope that helps...

Craig C.
0
 
craig_capelCommented:
if you want to see an app i made (full source code provided) very simple but i love it....

http://members.xoom.com/craig_c/ghost.zip  <<Sims key pressess like you asked, the source code shows you how i did it...

Hope that helps...

Craig C.
0
All Courses

From novice to tech pro — start learning today.