Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2018, 06:34 AM
rmt rmt is offline
Senior Member
 
Join Date: Jun 2013
Posts: 280
Default Delphi5: Show Caps Lock Warning Message.

Dear Expert,

I would like to show capslock warning message on LogId exit event in my dephi application if CapsLock is on. I used below code to show respective message but I want to show the message as shown in file attached here.

if Odd(GetKeyState(VK_CAPITAL)) //tests if caps lock is on
then showmessage('caps lock is on');

Thanks in advance,
Attached Images
File Type: png TestCapsLock.png (13.3 KB, 6 views)
__________________
Rmt
Reply With Quote
  #2  
Old 04-30-2018, 11:44 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,305
Default

This is not a default Delphi/Windows implementation as far as I know

You could enhance your TEdit with a OnWarning (similar to OnHint) and implement it. Here you can also see how OnHint does this. Or if you're lazy just use the OnHint and enhance it's output a little.
Problem with ShowMessage (any message dialog for that matter) is that you must click it away to proceed and then the visual indiciation is lost.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 04:47 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.