Class mytextbox: system.windows.Forms.textBox {protected override bool processKeyEventArgs (ref Message M) {Int S = m.wpaam.toint32 (); if (m.msg == 0x0102) {ix (((S <48) | (s> 57)) // This is a character (ASCII) return true;} return base.processKeyEventArgs (REF M);}}
The reason why the reason why we can intercept the ProcessKey event, but the characters have been entered in. It is difficult to achieve the effect of shielding (even if the mask is not really shielded, but the input is completed and then deleted.)