时间: 2021-07-31 作者:daque
触发程序onkeydown -> onkeypress -> onkeyup onkeypressr当按下一个ascii的字时灵验,对于其余没有反馈. //按照左右安排来变换图的场所 if key = vk_up then image1.top :=image1.top-32 else if key = vk_down then image1.top :=image1.top+32 else if key = vk_left then image1.left :=image1.left-32 else if key = vk_right then image1.left :=image1.left+32; 弥补 //本人看吧 procedure tform1.formkeypress(sender: tobject; var key: char); begin if key in ['0'..'9'] then showmessage('按下0至9'); end;