Hello,
I would like to disable in a program written with Lazarus the Alt+Tab Key, in order that the user can't move between the windows of my program with Alt+Tab, but only with the windows menu of my program.
This is due to a bug of the DBGrid, that force me to use still Lazarus 0.9.28.2 on Linux, that is quite old:
http://bugs.freepascal.org/view.php?id=22475The bug is very serious, if the user moves with Alt+Tab from a windows to another, the grid is no more ok and isn't possibile to insert/modify data. So it isn't possibile to give a program with this bug to a user.
I'd like, in the time that the bug will be resolved, to find a way to bypass the problem. I've worked a lot on the events deactivate and activate, but without success.
At this point then only solution that I could try colud be to avoid that the user can use Alt+Tab (of course only in the program written with Lazarus).
Is there a way to disable Alt+Tab (or another combination of keys, on Linux the user can personalize what key to use to move from windows) on Linux?
I've tried using the KeyDown event:
if (Key = 9{KeyTab}) and (ssAlt in Shift) then begin
Key := 0;
exit;
end;
This code gives no errors, but doesn't work, while the OS deplace already the window before Lazarus reise the KeyDown event.
Besides, the user might be set another combinations of Keys at the places of Alt+Tab (that I should know).
Is there a similar way also for Windows? (in any case the most important thing is on Linux).
Thank you very much for any help.
Sorry for my bad English.
Best regards,
Stefano