一聚教程网:一个值得你收藏的教程网站

热门教程

一个数字文本框控件,我觉得思路蛮不错的

时间:2022-07-02 12:00:19 编辑:袖梨 来源:一聚教程网

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Diagnostics;
namespace UtilityLibrary
{
    ///
    /// Summary description for NumericTextBox.
    ///

    public class NumericTextBox : System.Windows.Forms.TextBox
    {
        private int minimum = -1;
        private int maximum = -1;
        private bool useRange = false;
        private string lastChar;
        
        public NumericTextBox()
        {
       InitializeComponent();
        }
        protected override void OnPaint(PaintEventArgs pe)
        {
       base.OnPaint(pe);
        }
        public Size SetRange
        {
       get

热门栏目