Results 1 to 4 of 4

Thread: Key Trapper

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Posts
    55

    Talking

    Can anyone tell me how to get the inkey like in basic but in vb. Like i have a list and everytime the user presses a key it adds it to the list!!??

    Thanx

  2. #2
    Guest

    Lightbulb KeyDown or KeyAscii Event

    Use the KeyDown or KeyAscii events of your Form. This example will add whatever key you pressed to a ListBox.

    Code:
    Private Sub Form_KeyPress(KeyAscii As Integer)
    
        'Add the character to the ListBox
        List1.AddItem (Chr(KeyAscii))
        
    End Sub
    
    Private Sub Form_Load()
    
        'The Form will recieve the keys before the Controls
        Me.KeyPreview = True
        
    End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2000
    Posts
    55

    Angry no

    i mean when the form is invisible and the user types a letter and the program records it so if im on the internet and i happen to type the word "worth" if i look at the archive it saves the letters in I'll se "worth" somewhere in there!!!!!!

  4. #4
    Guest
    Use the GetAsyncKeyState API. I explaied how to use this in your other post regarding this subject.

    Click here to view it

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