How to identify caps lock on

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    How to identify caps lock on

    Hi,

    Two questions

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

    Code:
     if (TextBox.IsKeyLocked(Keys.CapsLock))
                {
                    MessageBox.Show("caps lock on");
                }
    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
    Recognized Expert Contributor
    • Dec 2007
    • 750

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

    Comment

    Working...