NumericKeypad 1.0.3

dotnet add package NumericKeypad --version 1.0.3
                    
NuGet\Install-Package NumericKeypad -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NumericKeypad" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NumericKeypad" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="NumericKeypad" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NumericKeypad --version 1.0.3
                    
#r "nuget: NumericKeypad, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NumericKeypad@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NumericKeypad&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=NumericKeypad&version=1.0.3
                    
Install as a Cake Tool

SmartNumericKeypad

A lightweight Windows Forms control that provides a borderless, draggable on-screen numeric keypad popup for TextBox and NumericUpDown controls.


🎯 Purpose

Physical keyboards aren't always available in touch-screen or kiosk-style desktop applications. NumericKeypad provides a popup keypad that attaches to any TextBox or NumericUpDown, letting users enter numeric values by tapping on screen instead.

✨ Features

  • Borderless, draggable popup window (drag by the top bar)
  • Works with both TextBox and NumericUpDown targets
  • Placeholder-aware input β€” clears placeholder text on the first keystroke
  • Doesn't steal focus from the target control (WS_EX_NOACTIVATE)
  • Portuguese (pt-PT) locale β€” comma decimal separator, Portuguese labels
  • Digits 0–9, decimal separator, backspace, and close button

πŸ—οΈ Architecture

Project Role
NumericKeypad.csproj Class library (.NET Framework 4.7.2) containing the NumericKeypad popup form
File Purpose
NumericKeypad.cs Form logic β€” constructor, event handlers, target control interaction
NumericKeypad.Designer.cs Designer-generated layout (buttons, top bar, labels)
NumericKeypad.resx Designer resources for the form
Properties/AssemblyInfo.cs Assembly metadata and version info

πŸ› οΈ Tech Stack

  • Language: C#
  • Framework: .NET Framework 4.7.2
  • UI: Windows Forms (System.Windows.Forms, System.Drawing)
  • Packaging: NuGet package SmartNumericKeypad

πŸš€ Quick Start

Prerequisites

  • Visual Studio 2019+ (or MSBuild) with the .NET Framework 4.7.2 targeting pack installed

Setup

msbuild NumericKeypad.csproj /p:Configuration=Release /p:Platform=AnyCPU

Output: bin/Release/NumericKeypad.dll

Usage

using NumericKeypad;

// Attach to a TextBox
var textBox = new TextBox { Text = "Enter amount..." };
var keypad = new NumericKeypad(textBox, placeholderText: "Enter amount...");
keypad.Show();

// Attach to a NumericUpDown
var numericUpDown = new NumericUpDown();
var keypad2 = new NumericKeypad(numericUpDown);
keypad2.Show();

Typical pattern: show the keypad on Enter/Click of the target control, positioned near it, and let the user tap digits, backspace, comma, or "Fechar" to close.

πŸ“‹ Configuration

No configuration files are required β€” behavior is controlled entirely through the constructor:

public NumericKeypad(Control target, string placeholderText = null)
  • target β€” the TextBox or NumericUpDown to receive input; throws ArgumentException if it's neither
  • placeholderText β€” optional placeholder value that gets cleared on the first digit press

πŸ§ͺ Testing

No automated test project is included in this repository. Verify changes manually by attaching the keypad to a TextBox and a NumericUpDown in a test form and exercising digits, backspace, decimal separator, dragging, and close.

πŸ“¦ Distribution

Packaging and publishing to NuGet.org is automated via nugetPackagePush.cmd:

nugetPackagePush.cmd

This builds the project (Release), commits/pushes to main, packs NumericKeypad.nuspec, pushes the package to nuget.org, and tags the release.

Note: The script contains a hardcoded NuGet API key and version numbers (1.0.0 β†’ 1.0.1) that must be updated manually before each release. Treat the API key as a secret.

πŸ“š Documentation

See claude.md for the full architecture breakdown, designer layout details, and event-handler reference.

🌐 Localization

UI text and decimal-separator behavior are hardcoded to Portuguese (pt-PT): "Teclado NumΓ©rico" title, "Fechar" close button, comma (,) as the decimal separator.

πŸ“ License & Support

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 114 7/28/2026
1.0.2 103 7/27/2026
1.0.0 106 7/27/2026