Hi again John,
Sorry I didn't give you all the details you were looking for, so hopefully I can remedy that.
Existing code uses a multi-line edit field for the password, and yes, the password property is checked.
My new code adds a check on the getfocus event for the password field, and using your suggested function, issues a custom message if the caps lock on is detected - as I mentioned, it works perfectly.
From your reply, I now suspect the problem is the use of the multi-line-edit instead of the single-line-edit for the password. This field has not been changed at all, and my business analyst tells me that the windows message used to work in the past, but possibly not since it was the SAP product.
Unfortunately I am not able to test the exe the way the users use it, our official build and deploy process is not open to developers, so I cannot verify a change to single-line-edit for the password field will give the windows message until time comes for user acceptance testing (and to give you some idea of our timeframes, I am working on these and other changes for a release around April 2021)
Many thanks for your help,
Cheryl