CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2000
    Location
    Belgium
    Posts
    4

    KeyboardManipulation

    Is it possible to activate or deactivate keys on the keyboard through VB-API?

    All help and or other ideas are welcome.


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: KeyboardManipulation

    Depending on what you want to do, you can use VB's SendKeys statement or the SendInput API


  3. #3
    Join Date
    May 1999
    Location
    India
    Posts
    9

    Re: KeyboardManipulation

    You can use Events like keypress,keydown like that for example u do not want any characters in a text box an example of a code will be

    Private Sub Text3_KeyPress(KeyAscii As Integer)
    If KeyAscii > 64 And KeyAscii < 91 Or KeyAscii > 96 And KeyAscii < 123 And KeyAscii = 32 Then
    Exit Sub
    Else
    KeyAscii = 0
    End If
    End Sub

    try this into a text box keypress event u'll not be able to enter any numbers it all will get deactivated like that u can do many things in this event

    try this
    happi programmin'
    bharat


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