11-09-2009, 05:19 PM
37- كود اجبار Edit على كتابة الحروف الكبيرة فقط (Majuscule) :
38- اجبار Edit على كتابة الحروف فقط + كتابة الأرقام و الفاصل وزر المسح فقط
كود :
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if Key in['a'..'z']then Dec(Key,32)
end;38- اجبار Edit على كتابة الحروف فقط + كتابة الأرقام و الفاصل وزر المسح فقط
كود :
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key in ['.' , ','] then
begin key:= DecimalSeparator; end;
if (Key in ['0'..'9',DecimalSeparator ]) then begin
Key := #0;
end;
end;كود :
if key in ['.' , ','] then
begin key:= DecimalSeparator; end;
if Not (Key in ['0'..'9',DecimalSeparator, #8 ]) then begin
Key := #0;
end;

![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)