Subj : HOTKEYS To : borland.public.cpp.borlandcpp From : George Date : Fri Sep 03 2004 04:08 pm Hello all! I'm catching an F1 key press like this. //h file void __fastcall WM_HOTKEY_CATCH(TWMHotKey msg); BEGIN_MESSAGE_MAP MESSAGE_HANDLER(WM_HOTKEY, TWMHotKey, WM_HOTKEY_CATCH) END_MESSAGE_MAP(TForm) extern unsigned int WM_HOTKEY_INDEX; //Cpp file #include h-file unsigned int WM_HOTKEY_INDEX; void __fastcall TForm1::WM_HOTKEY_CATCH(TWMHotKey msg){ if(msg.HotKey==WM_HOTKEY_INDEX){ ShowMessage("F1 pressed"); UnregisterHotKey(this->Handle, WM_HOTKEY_INDEX); } } void __fastcall TForm1::Button1Click(TObject *Sender) { String atom; atom="WM_HOTKEY"; WM_HOTKEY_INDEX=GlobalAddAtom(atom.c_str()); RegisterHotKey(this->Handle, WM_HOTKEY_INDEX, 0, VK_F1); } It works just fine! perfect. but I want to know on which component I was at the exact moment when the key was pressed..... is that possible???? any help would be appreciated thanks a lot .