title: BlockInput method doesn't work on windows 7?
body: <p>I'm trying to block input in my program but it doesn't work ...I read about this article and didn't find solution only the problem from vista-7 and above windows... 
  also I found unsolved topic here and I wish from you to help me...</p>
  
  <p>the code from </p>
  
  <blockquote>
    <p>"mr. LeftTechticle" at <a href="http://www.youtube.com/watch?v=P-EecpFOnuM" rel="nofollow">youtube video</a></p>
  </blockquote>
  
  <p>and he ran it perfectly...</p>
  
  <p>I tried the code but nothing happened...</p>
  
  <pre><code>//------------------------------------------Block Class----------------------------------
      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Windows.Forms;
      using System.Runtime.InteropServices;
      namespace WindowsFormsApplication14
      {
          static class InputBlocker
          {
              [DllImport("user32.dll")]
              static extern bool BlockInput(bool fBlockIt);
              private static Timer timer = new Timer();
              static InputBlocker()
              {
                  timer.Tick += new EventHandler(tick);
              }
              public static void Block(int mill)
              {
                  BlockInput(true);
                  timer.Interval = mill;
                  timer.Start();
              }
              private static void tick(object sender ,EventArgs e)
              {
                  BlockInput(false);
                  timer.Stop();
              }
          }
      }
  
  //------------------------------------------Form class---------------------------------
      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Linq;
      using System.Text;
      using System.Windows.Forms;
  
      namespace WindowsFormsApplication14
      {
          public partial class Form1 : Form
          {
              public Form1()
              {
                  InitializeComponent();
              }
  
              private void button1_Click(object sender, EventArgs e)
              {
                  InputBlocker.Block(10000);
              }
          }
      }
  </code></pre>