The simplest way to do this is is to just do a setfocus in the onClick event handler of each button eg.Originally Posted by Wizard
procedure TForm1.Button1Click(Sender: TObject);
begin
Music_Off;
Form1.SetFocus;
end;
If you then disable the tabstop for the buttons to prevent them getting focus any other way, it should work nicely.
I tested this with a Tmemo component and three buttons, and I think it does what you want it to.
[edit]
scratch that, I just tested it with a dxDraw component, and it dont work, I think dxdraw wont take the input focus, because it doesn't handle input itself
Bookmarks