that's not the way to go about setting up a hotkey - you need to use the RegisterHotKey API - search and i'm sure you'll find lots of examples.