are you asking how to grab keystrokes no matter what window your in? because i could pm you the source for a key logger i made that does that and you can have it run in the background of your program
All you do now is to capture Key-Strokes which is very basic.
Of course put the entry point as a DWORD then call it as a thread using CreateThread() then make the function read the return values and such in order to log and show keystrokes in a Visual perspective.
Is it going to be flagged by Anti-Virus software? If so, it isn't a problem. The software will only be used on my machine and my AV software will allow me to exclude checks on specified programs.
Why the hell are you using windows forms to write a simple DLL ? Use C or C++ to write it using a shared memory segment, this way you get your hjook DLL automatically injected into every process running on the system.