D d_delphi Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #1 怎样才能在DBEdit上敲回车键没有BB的响声?
J JobsLee Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #2 procedure xxx_onkeypress(...) begin if key=#13 then MessageBeep(0); end ;
D dxymzj Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #4 procedure xxx_onkeypress(...) begin if key=#13 then key=#0; end ;
J jrq Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #5 keypress中 if key=#13 then key=#0;
D databox1 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #6 Edit不接受回车,所以会发出WINDOWS的提示声音,你在WINDOWS中将那声音去掉,就知道是 这原因了。在消音,就照楼上的来,我的例子。 if key = #13 then begin Perform(CM_DIALOGKEY,VK_TAB,0);//到下一控件 Key := #0; end;
Edit不接受回车,所以会发出WINDOWS的提示声音,你在WINDOWS中将那声音去掉,就知道是 这原因了。在消音,就照楼上的来,我的例子。 if key = #13 then begin Perform(CM_DIALOGKEY,VK_TAB,0);//到下一控件 Key := #0; end;
S sydan Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-25 #7 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if key = #13 then begin Key := #0; Perform(WM_NEXTDLGCTL,0,0);//到下一控件 end; end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if key = #13 then begin Key := #0; Perform(WM_NEXTDLGCTL,0,0);//到下一控件 end; end;