Re: Keypress


[ DelphiLand FAQ ]

Posted by Joey p12386 on August 21, 2004 at 10:39:32:

In Reply to: Re: Keypress posted by webmaster Guido on August 19, 2004 at 15:16:23:


I don't actually want to simulate it on a component i was just wondering if there was a way to do it (ie. A Windows Message). I was going to use it to play around with making a game and just wanted to learn about handeling a keyboard and mouse and was wondering if i can emulate a keypress (seen it with mouse presses). I found these but they dont seem to work :|

keybd_event(vk_control, 1,0,0);
keybd_event(vk_F6, 1,0,0);
keybd_event(vk_F6, 1,keyeventf_keyup,0);
keybd_event(vk_control, 1,keyeventf_keyup,0);

But they don't seem to work :(

Thanks anyway ;)


Related Articles and Replies


[ Delphi Forum -- by DelphiLand ]