API - saber se alt, ctrl ou shift estah pressionada |
Top Previous Next |
|
// Saber se ALT, CTRL ou SHIFT estah pressionada
if (GetKeyState(VK_MENU) and $1000000) <> 0 then Label1.Caption := 'Alt Pressionada' else Label1.Caption := 'Alt não Pressionada';
if (GetKeyState(VK_CONTROL) and $1000000) <> 0 then Label2.Caption := 'Ctrl Pressionada' else Label2.Caption := 'Ctrl não Pressionada';
if (GetKeyState(VK_SHIFT) and $1000000) <> 0 then Label3.Caption := 'Shift Pressionada' else Label3.Caption := 'Shift não Pressionada'; |