disable textbox from taking special character in winforms C# -


i want disable special character text box in winforms (specially + , - symbol). have idea of e.handled, can't use using components exposes keyascii property me.

public sealed class keypresseventargs         : system.eventargs          {              public int keyascii = 0;             public keypresseventargs(int keyascii): base()             {                 this.keyascii = keyascii;             }     } 

you may take @ validators. https://msdn.microsoft.com/en-us/library/ms229603%28v=vs.110%29.aspx

or create custom control (textbox). http://www.codeproject.com/articles/2016/writing-your-custom-control-step-by-step


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -