雪 雪莱 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-12 #1 我想在Button1按钮下加一段可以控制键盘的事件如:上下键!!
W wwolf Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-12 #2 没有keydown吗? 如果没有就在窗体的keydown事件里写,判断一下当前焦点即可
W wwolf Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-12 #4 在onkeydown事件里写啊,判断一下keycode值
雪 雪莱 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-12 #5 这个我知道; procedure TF_qx001.dxInspector1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin key:=VK_NEXT; key:=VK_PRIOR; end; 我想在SpeedButton1事件里调用 procedure TF_qx001.SpeedButton1Click(Sender: TObject); begin -------这里怎么写??? end;
这个我知道; procedure TF_qx001.dxInspector1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin key:=VK_NEXT; key:=VK_PRIOR; end; 我想在SpeedButton1事件里调用 procedure TF_qx001.SpeedButton1Click(Sender: TObject); begin -------这里怎么写??? end;
M magiclynn Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-12 #6 你是不是想buton1click后如同键盘上其他键的作用 for exaple(down arrow): procedure TForm1.Button1Click(Sender: TObject); begin keybd_event( VK_DOWN, MapVirtualKey( VK_DOWN, 0 ), 0 , 0 ); keybd_event( VK_DOWN, MapVirtualKey( VK_DOWN, 0 ), 1 , 0 ); end;
你是不是想buton1click后如同键盘上其他键的作用 for exaple(down arrow): procedure TForm1.Button1Click(Sender: TObject); begin keybd_event( VK_DOWN, MapVirtualKey( VK_DOWN, 0 ), 0 , 0 ); keybd_event( VK_DOWN, MapVirtualKey( VK_DOWN, 0 ), 1 , 0 ); end;