textbox有個KeyPress事件

textbox改為對應的就可以用了                private   void   textBox_KeyPress(object   sender,   KeyPressEventArgs   e)                 {                         if   (textBox3.SelectionStart   ==   0)                         {                                 if   (e.KeyChar.CompareTo( '0 ')   ==   0   ||   e.KeyChar.CompareTo( '0 ')   <   0   ||   e.KeyChar.CompareTo( '9 ')   >   0)                                 {                                         e.Handled   =   true;                                 }                         }                         else                         {                                 if   (e.KeyChar.CompareTo( '0 ')   <   0   ||   e.KeyChar.CompareTo( '9 ')   >   0)                                 {                                         if   (e.KeyChar   !=   '/b ')                                                 e.Handled   =   true;                                 }                         }                 }