I IdeasWare Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-24 #1 在Delphi中用 if not (Key in ['0'..'9',#8]) then begin Key := 0; end; 请转化?
S Sachow Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-24 #3 用集合对象的Contains方法: void __fastcall TForm1::Button3Click(TObject *Sender) { TMsgDlgButtons Btns; MessageDlg("这是一个没有按钮的MessageDlg", mtInformation, Btns, 0); if (!Btns.Contains(mbOK)){ Btns << mbOK; MessageDlg("哈哈, 现在有按钮喽!", mtInformation, Btns, 0); } } //---------------------------------------------------------------------------
用集合对象的Contains方法: void __fastcall TForm1::Button3Click(TObject *Sender) { TMsgDlgButtons Btns; MessageDlg("这是一个没有按钮的MessageDlg", mtInformation, Btns, 0); if (!Btns.Contains(mbOK)){ Btns << mbOK; MessageDlg("哈哈, 现在有按钮喽!", mtInformation, Btns, 0); } } //---------------------------------------------------------------------------
C chenxz Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-26 #4 if ((Key > '9') || (Key < '0')) { ... }