Simulate key stroke in any application
See the question and my original answer on StackOverflowI suggest you use this very cool library that masks all the complexity for you, the Windows Input Simulator available here: http://inputsimulator.codeplex.com/
I believe it's based on the Windows' SendInput function.