示例#1
0
 private bool txt_focus(TextBox[] arrTxt)
 {
     if (arrTxt != null)
     {
         int countTxt = arrTxt.Count();
         for (int i = 0; i < countTxt; i++)
         {
             TextBox txt = arrTxt[i];
             if (txt.Visible == true && txt.Enabled == true)
             {
                 txt.Focus();
                 return true;
             }
         }
     }
     return false;
 }