BelhardTraining.Windows.Forms.Controls.NumericTextBox.WndProc C# (CSharp) Метод

WndProc() защищенный Метод

protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message
Результат void
        protected override void WndProc(ref Message m)
        {
            const int WM_PASTE = 0x0302;
            if (m.Msg == WM_PASTE)
            {
                string text = Clipboard.GetText();
                if (string.IsNullOrEmpty(text)) return;

                if ((text.IndexOf('+') >= 0) && (SelectionStart != 0)) return;

                int i;
                if (!int.TryParse(text, out i)) return;

                if (i < 0 && SelectionStart != 0) return;
            }
            base.WndProc(ref m);
        }