I would like for my form to close when the user presses enter. I have tried the OnKeyDown, OnKeyPress and OnKeyUp to use
if Key = #13 then Self.Close;
but that doesn't work.
I know that I can have a button with the default := True, but I don't have any buttons on the form and don't want to add any.
If anyone knows why the above isn't working or something else to try, I'd appreciate it.
leslie
if Key = #13 then Self.Close;
but that doesn't work.
I know that I can have a button with the default := True, but I don't have any buttons on the form and don't want to add any.
If anyone knows why the above isn't working or something else to try, I'd appreciate it.
leslie