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); }