Connecting Tech Pros Worldwide Forums | Help | Site Map

How to identify caps lock on

Needs Regular Fix
 
Join Date: Jan 2007
Posts: 365
#1: May 30 '09
Hi,

Two questions

1. In windows application if we put on the below code, it will identify whether caps lock is on or not

Expand|Select|Wrap|Line Numbers
  1.  if (TextBox.IsKeyLocked(Keys.CapsLock))
  2.             {
  3.                 MessageBox.Show("caps lock on");
  4.             }
But in web application too, i want to identify, whether the caps lock is on or not.
How do I do that?

2. in visual basic
Private Sub Text1_GotFocus()

End Sub
I want the equivalent in .net windows application, in web application we can go for script, but wat will be event in windows application.


Regards
cmrhema

PRR PRR is offline
Moderator
 
Join Date: Dec 2007
Location: India
Posts: 702
#2: Jun 1 '09

re: How to identify caps lock on


For web app you will have to use JavaScript...
* Detect Capslock
* Detect Caps Lock with Javascript
* Link
Reply