If it is C#
your actually looking for the Virtual Key, same as Vb.net ,
[php]
VK_F12 = 0x7B
[/php]
And someone correct me if I am wrong, but you are following a tut,
The Value you are setting is for a hotkey, not specifically for f11
You could also add
[php]
if (message.Msg == F12)
{
timer1.Enabled = false;
}
[/php]