...Catch SHIFT key during menu item selection?
Author: Rodney E Geraghty
procedure TForm1.Menu11Click(Sender: TObject);
begin
{Check if Shift key is down}
if HiWord(GetKeyState(VK_SHIFT)) <> 0 then
label1.Caption := 'Shift'
else {Check if Ctrl key is down}
if HiWord(GetKeyState(VK_CONTROL)) <> 0 then
label1.Caption := 'Control'
else {Check if Alt key is down}
if HiWord(GetKeyState(VK_MENU)) <> 0 then
label1.Caption := 'Alt'
else
label1.Caption := 'None';
end;
printed from
www.swissdelphicenter.ch
developers knowledge base