title: C# how do I prevent tab key press when textbox is empty
body: <p>Below code is work fine but how can I stop tab key when my textbox.text is empty how I put my if logic in ProcessCmdKey event?</p>
  
  <pre><code>bool a = true;
  protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
  {
      if (keyData == Keys.Tab &amp;&amp; !a)
      {
          return true;
      }
      return base.ProcessCmdKey(ref msg, keyData);
  }
  </code></pre>