I get this when I have a Caps Lock with password control in focus. Instead, I would like to add my own warning. How can I disable this? I am not against P / Invoke or any native code, but it should be in C #.
In your form, redefine WndProc so that it intercepts the EM_SHOWBALOONTIP message and does not allow the control to receive it:
protected override void WndProc(ref Message m) { if (m.Msg != 0x1503) //EM_SHOWBALOONTIP base.WndProc(ref m); }
The following code works for me in the KeyDown TextBox event:
KeyDown
TextBox
private void txtPassword_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.CapsLock) { e.SuppressKeyPress = true; } }