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

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

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