Hi,
using System.Windows.Forms;
takes two periods; it has been present since day one of .NET, and is still there.
Key handling hasn't changed over time, it works the same on all versions of C# and Visual Studio. Hence, all documentation and all correct examples should allow you to solve whatever it is you are trying (your question is a bit mysterious about it).
That said, I don't like
while(!(KeyBoard == true))
as that suggests a busy wait loop, something that is a big nono on Windows; event driven code should be used consistently.
:)