BelhardTraining.Windows.Forms.Controls.NumericTextBox.OnHandleCreated C# (CSharp) Method

OnHandleCreated() private method

private OnHandleCreated ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void
        private void OnHandleCreated(object sender, EventArgs args)
        {
            const int ES_NUMBER = 0x2000;
            const int GWL_STYLE = -16;

            int style = GetWindowLong(Handle, GWL_STYLE);
            SetWindowLong(Handle, GWL_STYLE, style | ES_NUMBER);
        }