C# Custom control – TextBox accepting only numbers, decimal numbers, signed numbers

| | | | |

The creation of custom control using Visual Studio involves the following steps:

  1. Start Visual Studio;
  2. Create new “Windows Control Library” project;
  3. In the created project delete “User Control” file;
  4. Go to “Project” > “Add User Control” and give it a name;
  5. Change the inherited class to this that you want your control to be;
  6. Create you custom properties for the control;
  7. Compile the project: Go to “Build” > “Build Solution”;
The generated DLL file is located in you projects folder under:“bin/Debug/UserContolName.dll” or “bin/Release/UserContolName.dll”.That depends on how your solution is configured: “Debug mode” or “Release mode”.