A general way of blocking the cursor is to set it to wait
Cursor = Cursors.WaitCursor;
I'd tend to agree with the people commenting, that you'll NEVER get compliments for taking peoples keyboard, after all, they may be wanting to alt-tab to change focus for instance. Preventing this would be characterized as a virus!
But suppose you only mean in your own application, it becomes relevant what type of application you are using(?)
Essentially you can achieve what you will by listening in on key-down event
private void MyKeyDownEventHandler(object sender, KeyEventArgs e)
{
e.SuppressKeyPress = true;
}
Then simply remove your event listener when you want the keyboard to work.