title: vb.net how to simulate keydown and keyup of keyboard
body: <p>i want to find out how can i simulate a keydown and keyup. Like i want my program to hold on ctrl button for 5second then release it. I done this using autohotkey and it was pretty easy, but i want to make a gui for that. here is my sample code from autohotkey and i hope someone can translate this to vb.net or help me for keydown and keyup.</p>
  
  <pre><code>INSERT::
      Sendinput, {LControl Down}
      Sleep 2000
      Sendinput, {LControl Up}
  Return
  </code></pre>
  
  <p>in the code above, when i press the INSERT button it will hold the left control button for 2seconds then release it.</p>