CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Caps Lock

  1. #1
    Join Date
    Apr 2001
    Location
    Lincs, UK
    Posts
    16

    Caps Lock

    How can I disable the use of the caps lock and the shift keys in a text box keypress event
    I need to be able to control how the user inputs text in a text box by code


  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: Caps Lock

    Assuming you want all lowercase...


    private Sub Text1_KeyPress(KeyAscii as Integer)
    KeyAscii = Asc(LCase(Chr(KeyAscii)))
    End Sub





  3. #3
    Join Date
    Apr 2001
    Location
    Lincs, UK
    Posts
    16

    Re: Caps Lock

    I will give it a go thanks
    dar1


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured