09-04-2012, 07:26 PM
وعليكم السلام ورحمة الله وبركاته
منقول:
بالتوفيق.
منقول:
كود :
//Oleg Zavgorodnij
procedure TForm1.FormCreate(Sender: TObject);
begin
KeyPreview := True;
end;
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
if not (ActiveControl is TDBGrid) then begin
Key := #0;
Perform(WM_NEXTDLGCTL, 0, 0);
end
else if (ActiveControl is TDBGrid) then
with TDBGrid(ActiveControl) do
if SelectedIndex < (fieldcount -1) then
SelectedIndex := SelectedIndex +1
else
SelectedIndex := 0;
end;
اللهم احقن دماء المسلمين، لا تنسوهم بالدعاء...

