If this is stil relevant, then a simple way of locking down the computer for good without using any hooks is to do as follows:
First, create the Form_LostFocus Eventhandler. This isn't in the properties->events window, so you'll have to add it programmatically:
this.LostFocus += new ...
This is called when the from loses focus, so in here we need to give focus back to the form:
this.Focus();
this.Activate();
This method works best if focus is then given to a control on the form:
textBox1.Focus();
Next, add a timer, with an interval of 100ms, and enable it. This timer will check if the form has focus, and if not, will give it focus:
// in the Tick Eventhandler
if (!this.Focused)
this.Focus();
This will effectively ensure that no matter what your user attemps to do, the program will always steal focus - even if he opens the task manager.
Then just make the program fullscreen:
Set 'TopMost' property to true.
Set 'WindowState' to 'maximised'.
Set 'FormBorderStyle' to 'None'.
Finally, handle the Form_Closing Eventhandler.
// Global boolean value - set this to true when
// the user has completed the set tasks
boolean complete = false;
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (!complete)
e.cancel = true;
}
Please note: In general, stealing focus is extremely bad practice.