Z ztliuyun Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #1 三层结构软件编程,控件DbGrid通过ClientDataSet联结到数据库。现在我想在程序中屏蔽掉 删除记录的热键Ctrl+Delete,请教该怎么做,谢谢大家
Z ztliuyun Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #3 请问具体代码怎么实现??谢谢 怎样检测到是Ctrl+Delete, 我只是想让该热键不作删除操作 代码里应该写什么?
Q QuickSilver Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #4 在DBGrid1KeyDown事件中加入 procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (ssctrl in shift) and (key=vk_delete) then key:=0; end;
在DBGrid1KeyDown事件中加入 procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (ssctrl in shift) and (key=vk_delete) then key:=0; end;
W w12345678 Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #5 option中的dgconfirmdelete设为false试一试
草 草央包包 Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #6 如果不在DBgrid中编辑数据可直接将Dbgrid的readonly设为true; 否则用DbgridEh最简单
M maming Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-15 #7 option中的dgconfirmdelete设为false