The solution is to call WM_KILLFOCUS
and WM_SETFOCUS
, this will force the editor to show "Caps Lock is On" balloon:
if GetKeyState(VK_CAPITAL) and 1 <> 0 then
begin
if edtPassword.Focused then
begin
PostMessage(edtPassword.Handle, WM_KILLFOCUS, 0, 0);
PostMessage(edtPassword.Handle, WM_SETFOCUS, 0, 0);
end;
end;