char[] values = txbNewSN.Text.ToCharArray(); for (int vindex = 0; vindex < values.Length; vindex++)
{
int value = Convert.ToInt32(values[vindex]);
string hexOutput = String.Format("{0:X}", value);
hexString += hexOutput;
}
headString = "6B0D00010A" + hexString;txbNewSN.Text是一个ComboBox控件,我想让他只能输入10个字符,怎么实现?求救,本人以前是做底层驱动C的,现在领导突然叫我用C#写APP。。
{
int value = Convert.ToInt32(values[vindex]);
string hexOutput = String.Format("{0:X}", value);
hexString += hexOutput;
}
headString = "6B0D00010A" + hexString;txbNewSN.Text是一个ComboBox控件,我想让他只能输入10个字符,怎么实现?求救,本人以前是做底层驱动C的,现在领导突然叫我用C#写APP。。
if(txbNewSN.Text.Length>10)
{
MeeeageBox.Show("输入的字符太长");
txbNewSN.Clear();
txbNewSN.Focus();
}
我刚刚找到了,是ComboBox控件,也有MaxLength这个设置值
我刚刚找到了,是ComboBox控件,也有MaxLength这个设置值就是这个设置长度
this.btnSendNewSN = new System.Windows.Forms.RichTextBox(); 这个是空间的初始化。
我现在跑脚本后,上位机软件会死掉,应该是线程的问题。我想单独给RichTextBox开一个线程