Topic: How to call a form.button.click pressing ENTER
Hi!
Do any of you know how to do that after entering a value in a cell and press ENTER that calls a form.button.click?
Thanks!!
My Visual Database → General → How to call a form.button.click pressing ENTER
Hi!
Do any of you know how to do that after entering a value in a cell and press ENTER that calls a form.button.click?
Thanks!!
procedure Form1_Edit1_OnKeyDown (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
If Key = 13 then Form1.Button1.Click; // The Button1 action is set to Show Form2
end;
However, you do not need to simulate the button click unless you have a reason to., You can just call the form - see below
If Key =13 then Form2.Show;
procedure Form1_Edit1_OnKeyDown (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
If Key = 13 then Form1.Button1.Click; // The Button1 action is set to Show Form2
end;However, you do not need to simulate the button click unless you have a reason to., You can just call the form - see below
If Key =13 then Form2.Show;
Thanks ehwagner!!! That works ok!!
My Visual Database → General → How to call a form.button.click pressing ENTER
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi